🍄class
🚧 under construction
Last updated
🚧 under construction
Last updated
creates a new class and gives it a name (identifier).
no commas between class member declarations
private member identifiers are prefixed with hash (#).
⭐️⭐️⭐️ you can change the prototype of a function, but not that of a class.
using typeof on lexical declaration (let/ const/ class) in its temporal dead zone will throw a ReferenceError.
replit:TDZ: let/const/class
class declaration is not hoisted
cannot use a class before its declaration ( temporal dead zone)
a class's prototype (property) is read-only
ReferenceError: cannot access '...' before initialization.
an error mostly caused by referencing a let/ const/ class in its temporal dead zone
object literal / class / switch ( no block scope)
function's scope is different from a block scope