JavaScript – class Statement
The class statement initiates a class with properties and methods assigned in the constructor() method.
The class statement initiates a class with properties and methods assigned in the constructor() method.
The const statement declares a variable (container for storing information) with an immediately defined value that will not change.
The continue statement breaks an iteration in the loop, if a specified condition occurs, and then continues with the next iteration in the loop.
The debugger statement stops the execution of a script and calls the debugger. If debugging is unavailable, the statement has no effect.
The do…while statement defines a code block to be executed at least once, and repeated as long as a condition is true.
The for statement defines a block of code to be executed as long as a specified condition is true.
The for…in statement loops over the properties of an object, executing a block of code inside the loop once for each item found.
The for…of statement loops over the values of any iterable, executing a block of code inside the loop once for each item found.
The function statement declares a function to be executed later, when it is called. Functions are objects, and have both properties and methods.
The if…else statement executes a block of code if a specified condition is true, and optionally, another block of code if false.
The let statement declares a variable (container for storing information), and can be empty when declared, with the value assigned later.
The switch statement executes different blocks of code depending on set conditions, and uses the break keyword to break out of the switch block.
The throw statement allows you to generate a custom error (throw an exception), which can be a String, a Number, a Boolean, or an Object.
The try…catch…finally statement handles errors without stopping JavaScript to output the error.
The var statement declares a variable (container for storing information), and can be empty when declared, with the value assigned later.
The while statement defines a code block to be executed for as long as a condition is true.
The Array concat() method joins two or more arrays, returning a new array containing the joined arrays, without changing the existing arrays.
The Array constructor property returns the function that created the Array prototype.
The Array copyWithin() method copies array elements to another position in an array, overwriting the existing values.
The Array entries() method returns an array iterator object that shows the key and value pairs currently existing within the array.