The ECMAScript language includes
structured,
dynamic,
functional, and
prototype-based features.
Imperative and structured ECMAScript JavaScript supports
C-style structured programming. Previously, JavaScript only supported
function scoping using the keyword var, but ECMAScript 2015 added the keywords let and const, allowing JavaScript to support both block scoping and function scoping. JavaScript supports
automatic semicolon insertion, meaning that semicolons that normally terminate a statement in C may be omitted in JavaScript. Like C-style languages,
control flow is done with the , , / , / , and statements. Functions are weakly typed and may accept and return any type. Arguments not provided default to .
Weakly typed ECMAScript is
weakly typed. This means that certain types are assigned implicitly based on the operation being performed. However, there are several quirks in JavaScript's implementation of the conversion of a variable from one type to another.
Dynamic ECMAScript is dynamically typed. Thus, a type is associated with a value rather than an expression. ECMAScript supports various ways to test the type of objects, including
duck typing.
Transpiling Since ES 2015, transpiling JavaScript has become very common. Transpilation is a
source-to-source compilation in which newer versions of JavaScript are used, and a transpiler rewrites the source code so that it is supported by older browsers. Usually, transpilers transpile down to ES3 to maintain compatibility with all versions of browsers. The settings to transpile to a specific version can be configured according to need. Transpiling adds an extra step to the build process and is sometimes done to avoid needing
polyfills. Polyfills create new features for older environments that lack them. Polyfills do this at runtime in the interpreter, such as the user's browser or on the server. Instead, transpiling rewrites the ECMA code itself during the build phase of development before it reaches the interpreter. == Conformance ==