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
adynamic,weakly typed,prototype-based language withfirst-class functions.
JS is Dynamic
//Compilation and execution happen together.varpropMap={val:"value",html:"innerHTML"};for(varfnNameinpropMap){$.prototype[fnName]=(function(prop){returnfunction(){returnthis[prop];}})(propMap[fnName]);}
JS is Weakly Typed
//Type associated with value, not variable.vara=1;a="one";a=[1];a={one:1};
JS has 1st Class Functions
//Treat like any objectvarsquare=function(x){returnx*x},//createmult=function(f1,f2){// Returnreturnfunction(n){returnf1(n)*f2(n);}},bigF=mult(square,square),// ARGvalue=bigF(2);// 16
JS is Prototype Based
JavaScript (JS) is a lightweight, interpreted orJIT compiled programming language withfirst-class functions. Most well-known as the scripting language for Web pages,many non-browser environments also use it, such asnode.js and ApacheCouchDB. JS is aprototype-based, multi-paradigm, dynamic scripting language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles.