SEMrush

Java Script Behavior

Java Script is Structured
JavaScript supports  structured programming syntax much like C, for excample  if statements, do while loops, while loops, switch statements, etc. Also JavaScript has function scoping . It also makes a distinction between expressions and statements. One syntactic difference from C is automatic semicolon insertion, that allows the semicolons that would normally terminate statements to be omitted.

Java Script is Dynamic
Dynamic typing
As in most scripting languages, types are associated with values, not with variables. JavaScript supports various ways to test the type of an object, including duck typing.


Java Script is Object-based
JavaScript is mostly object-based. Object property names are string keys. They support two equivalent syntaxes: dot notation (obj.x = 10) and bracket notation (obj['x'] = 10). Properties and their values can be added, changed, or deleted at run-time. Most properties of an object (and those on its prototype inheritance chain) can be enumerated using a for...in loop.

Run-time evaluation
JavaScript includes an eval function that can execute statements provided as strings at run-time.
Functional

First-class functions
Functions are first-class; they are objects themselves. They have properties and methods, such as .call() and .bind().

Java Script supports Nested function
 A nested function is a function defined within another function. It is created each time the outer function is invoked.

Java Script is Prototype-based
JavaScript uses prototypes where many other object-oriented languages use classes for inheritance.It is possible to simulate many class-based features with prototypes in JavaScript.