I was reviewing function declaration and function expression, separately, no problem
function add(a,b){return a+b};
var add2 = function(a,b){return a+b};
add(1,2)// 3
add2(1,2) // 3
But if I try to combine them the function declaration gets ignored
var add3 = function add4(a,b){return a+b}
add3(1,2) // 3
add4(1,2) // ReferenceError: add4 is not defined
I have no real case where I would need this type of declaration but I'm trying to understand why it wouldn't work
Anybody knows the right bit of literature ?