w3resource

JavaScript: Core Objects

JavaScript : Core Objects

List of JavaScript core objects

Name of the object Version
Array Object Implemented in JavaScript 1.1
Boolean Object Implemented in JavaScript 1.1
Date Object Implemented in JavaScript 1.0
Function Object Implemented in JavaScript 1.1
Java Implemented in JavaScript 1.2
JavaArray Implemented in JavaScript 1.1
JavaClass Implemented in JavaScript 1.1
Java Implemented in JavaScript 1.1
JavaPackage Implemented in JavaScript 1.1
Math Object Implemented in JavaScript 1.0
netscape Implemented in JavaScript 1.1
Number Object Implemented in JavaScript 1.1
Object Implemented in JavaScript 1.0
Packages Implemented in JavaScript 1.1
RegExp Object Implemented in JavaScript 1.2
String Object Implemented in JavaScript 1.0
sun Implemented in JavaScript 1.1

Previous: JavaScript Object
Next: Javascript Array Objects - Properties and Methods



JavaScript: Tips of the Day

Assigns default values for all properties in an object that are undefined

Example:

const tips_defaults = (obj, ...defs) => Object.assign({}, obj, ...defs.reverse(), obj);
console.log(tips_defaults({ p: 1 }, { q: 2 }, { q: 6 }, { p: 3 })); 

Output:

[object Object] {
  p: 1,
  q: 2
}