Array vs Object in JavaScript – Learn the Difference
An array bundles values that a user cannot name, while an object bundles values that a user can name.
An array bundles values that a user cannot name, while an object bundles values that a user can name.
A class field is a property defined directly in a class's body—not inside any of the class's methods.
A JavaScript class is an object constructor that the new keyword uses to create a new object instance.
The clear() method deletes all the items in the specified web storage. It accepts no argument.
Default function properties are the built-in variables available in every function declaration.
An enumerable property is a property whose enumerable attribute's value is configured to be true.
The getItem() method retrieves the value of a web storage item. It accepts one required argument.
JSON (JavaScript Object Notation) is a text format for interchanging data between clients (web pages) and servers.
The key() method retrieves a web storage item's name. It accepts one required argument.
The length property returns the number of properties in the specified web storage.
The new keyword creates an object from a JavaScript constructor function or class. Therefore, the newly created object becomes an instance of the constructor.
A non-primitive data is a JavaScript value that can contain multiple other values. Object is the only non-primitive data that exist in JavaScript.
Object destructuring is a unique technique that allows you to neatly extract an object's value into new variables.
An object is an element you can use to bundle up multiple named values into a single item. A pair of braces define JavaScript's properties object.
Object.assign() copies its source objects' enumerable own properties and assigns them to the target object.
The Object.entries() JavaScript method copies an objects' enumerable own key-value pairs into a new array.
Object.hasOwn() returns true if an object has a specified property as its own property. Otherwise, it returns false.
The Object.keys() JavaScript method copies an objects' enumerable own keys into a new array.
The Object.values() JavaScript method copies an objects' enumerable own values into a new array.
A JavaScript primitive data type is any plain value used to program a webpage. Examples are Number, Boolean, String, Null, and BigInt.
The removeItem() method removes a property from the specified web storage. It accepts one required argument.
The rest operator is a syntax used to encase the rest of specific user-supplied values into a JavaScript array. It works with functions.
setItem() sets its key and value arguments in the specified local or session storage object.
The spread operator helps to expand iterables into individual elements. It is effective only when used within an array, function, or object.
The super keyword searches a parent class or object literal for a specified static or prototypal property.
Web storage is the JavaScript API browsers provide for storing data locally and securely within a user's browser.
A block is a pair of braces used to group multiple statements. Block typically gets used in JavaScript functions and CSS rulesets.