In JavaScript, statements are like sentences, expressions are like phrases and operators are like punctuation. The following are examples to show ways in which these…
Read more8 mins
8 mins
In JavaScript, statements are like sentences, expressions are like phrases and operators are like punctuation. The following are examples to show ways in which these…
Read more5 mins
JavaScript modules enable multiple scopes to share code. Modules use closures to keep things private and only make public certain things. Below a function is…
Read more9 mins
In JavaScript, objects are the only construct. Each object has a special private property [[Prototype]], that is either null or links to another object called…
Read more14 mins
The value of this has nothing to do with where a function is declared but instead is determined by how a function is called. It…
Read more4 mins
An Immediately Invoked Function Expressions (IIFE) is a JavaScript function that runs as soon as it is defined. Since the keyword function does not come…
Read more5 mins
A closure occurs when a function is able to remember and access its lexical scope even when that function is executing outside its lexical scope….
Read more4 mins
Variables declared with var do not have block scope. This is because block statements do not introduce a scope and the var keyword attaches variables…
Read more7 mins
JavaScript has a very sophisticated compiler that checks hundreds of lines of code in milliseconds to see if it contains any errors. If there is…
Read more4 mins
In JavaScript, a variable may store two types of data: primitive and reference. When you assign a variable a value, the JavaScript engine must determine…
Read more4 mins
JavaScript has the following types of operators: An assignment operator assigns a value to its left operand based on the value of its right operand:…
Read more