You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getName(); // undefined
console.log(getName); // Uncaught TypeError: getName is not a function
var getName = function () {
console.log("Namaste JavaScript");
}
// it is undefined because in arrow function behaves as a variable and not function.
Below is the correct one
getName(); // TypeError: getName is not a function and after this line code will not execute.
console.log(getName);
var getName = function () {
console.log("Namaste JavaScript");
}
// it is undefined because in arrow function behaves as a variable and not function.
The text was updated successfully, but these errors were encountered:
Below is the correct one
The text was updated successfully, but these errors were encountered: