Here i have two questions regarding javascript functions
When to use function declaration and when to use function expression
This is an function expression
var run = function (){ // code stuff }
This is an function declaration
function walk(){
// code stuff
}
What do we call functions written inside below object(human) is it declaration or expression?
var human = {
think : function(){
}
roll : function(){
}
}