The difference is that start is a function expression and so only defined when that line is reached, whereas
M
is a function declaration and is defined as soon as its surrounding function or script is executed.
For example, a function expression:
// TypeError: undefined is not a function
start();
var start=function(){
console.log("Start function called !");
}
//It will work
m();
function m() {
console.log("Function M is working fine");
}