Queston about " function ".. #confusion


there are two ways of making a function i've learnt so far in this course...

function me(){
var me = function(){
now my question is when to make function by "first" method and "second" method


The first way is typically used in constructors of custom Objects, the second is a convention for functions of all other uses. Leave a reply with any questions please! :smile:


so we can't make a constructor or class by using this:

var me = function(){};


No, that is not the typical convention.



Found with google search
== discussions / opinions ==
javascript var function vs named function

javascript return statement

=closure scope hoisting=