Uncategorized

Object to primitive conversion

0

What happens when objects are added obj1 + obj2, subtracted obj1 – obj2 or printed using alert(obj)? JavaScript doesn’t allow you to customize how operators work on objects. Unlike some...

Symbol type

0

By specification, only two primitive types may serve as object property keys: Otherwise, if one uses another type, such as number, it’s autoconverted to string. So...

Optional chaining ‘?.’

0

A recent addition This is a recent addition to the language. Old browsers may need polyfills. The optional chaining ?. is a safe way to access nested object properties,...

Object methods, “this”

0

Objects are usually created to represent entities of the real world, like users, orders and so on: And, in the real world, a user can act: select...

Garbage collection

0

Memory management in JavaScript is performed automatically and invisibly to us. We create primitives, objects, functions… All that takes memory. What happens when something is not...

Object references and copying

0

One of the fundamental differences of objects versus primitives is that objects are stored and copied “by reference”, whereas primitive values: strings, numbers, booleans, etc –...

Object to primitive conversion

0

As we know from the chapter Data types, there are eight data types in JavaScript. Seven of them are called “primitive”, because their values contain only a...

Objects: the basics

0

1. Objects 2. Object references and copying 3. Garbage collection 4. Object methods, “this” 5. Constructor, operator “new” 6. Optional chaining ‘?.’ 7. Symbol type 8....