Skip to content

Functions

IT Notes → Javascript @ December 22, 2020

  • Declarative/static.
  • Dynamic/anonymous (parsed many times).
  • var variable = new Function ("param1", "param2", ... , "paramn", "function body");
    
    //Literal (Parsed only once)
    
    var func = (params) {
    statements;
    }
  • If a function is used within an expression in another statement, it’s an example of a function literal no matter what the expression is.
  • functionName.length gives the number of arguments.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x