Object Data Types in JavaScript

Rumman Ansari   Software Engineer   2024-09-29 07:51:20   359  Share
Subject Syllabus DetailsSubject Details Login to Open Video
☰ TContent
☰Fullscreen

Table of Content:



// Object Data Types
let objectVar = {  }; // Object

let arrayVar = [1, 2, 3];         // Array

// let functionVar = function() {};  // Function
let functionVar = () => console.log(2+3) ;  // Function

functionVar();

console.log(typeof objectVar);    // Output: object
console.log(typeof arrayVar);     // Output: object (arrays are a type of object)
console.log(typeof functionVar);  // Output: function

Mastering JavaScript: From Fundamentals to Advanced Concepts

Stay Ahead of the Curve! Check out these trending topics and sharpen your skills.