Skip to content
JS FAQ - JavaScript Guides Online

Get answers to your JavaScript questions. Explore detailed how-to guides, code examples, and best practices for beginners and developers.

  • Home
  • Home
Books
Home » object » Page 2
How to access object properties in JavaScript
Posted inObjects and Prototypes

How to access object properties in JavaScript

Posted inObjects and PrototypesTags: bracket notation, dot notation, js objects, object
Common pitfalls in JavaScript object property access include handling undefined vs null, prototype chain properties, shadowing, and truthy/falsy evaluations. Use hasOwnProperty and optional chaining to safely access properties and avoid errors when properties are missing or inherited.
Read More
How to export multiple functions in a Node.js module
Posted inNode.js Core

How to export multiple functions in a Node.js module

Posted inNode.js CoreTags: exports, module.exports, node.js, object
Importing multiple functions from CommonJS modules involves requiring the exported object and destructuring needed functions for clarity and maintainability. Techniques include nested destructuring, aliasing imports, conditional requires, class imports, and re-exporting functions to simplify module consumption in Node.js.
Read More
How to create an instance of a class in JavaScript
Posted inClasses and Inheritance

How to create an instance of a class in JavaScript

Posted inClasses and InheritanceTags: class, js classes, new, object
JavaScript classes offer syntax for prototype inheritance. Define a class with a constructor, methods, and use `extends` for inheritance. Includes static methods, getters, setters, and private fields (#). Manage `this` context with arrow functions and avoid pitfalls like hoisting and async constructors.
Read More
How to create an object in JavaScript
Posted inObjects and Prototypes

How to create an object in JavaScript

Posted inObjects and PrototypesTags: js objects, literal, object
In JavaScript, object literals provide a convenient way to create objects using a simple syntax.…
Read More
How to use the Math object in JavaScript
Posted inStandard Objects: Math

How to use the Math object in JavaScript

Posted inStandard Objects: MathTags: js math, math, numbers, object
JavaScript Math functions: Math.max() & Math.min() on arrays using spread syntax to avoid NaN. Generate random integers in a range with Math.random(). Core functions: Math.abs(), Math.pow(), Math.sqrt(). Security warning: Math.random() is not cryptographically secure.
Read More

Posts pagination

Previous page 1 2
Copyright 2026 — JS FAQ - JavaScript Guides Online. All rights reserved.
Scroll to Top