0% found this document useful (0 votes)
43 views10 pages

JavaScript Data Types Bangla

JavaScript has two main types of data: Primitive and Non-Primitive. Primitive data types include Number, String, Boolean, Undefined, Null, BigInt, and Symbol, while Non-Primitive types consist of Object, Array, and Function. The document also discusses how to check types using 'typeof' and addresses common confusions regarding data types.

Uploaded by

studyroom.sayam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views10 pages

JavaScript Data Types Bangla

JavaScript has two main types of data: Primitive and Non-Primitive. Primitive data types include Number, String, Boolean, Undefined, Null, BigInt, and Symbol, while Non-Primitive types consist of Object, Array, and Function. The document also discusses how to check types using 'typeof' and addresses common confusions regarding data types.

Uploaded by

studyroom.sayam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

JavaScript ডেটা টাইপস

• জাভাস্ক্রিপ্টে দুটি প্রধান ধরনের ডেটা টাইপ রয়েছে:


• 1. Primitive
• 2. Non-Primitive (Reference)
Primitive Data Types
• 👉 Number
• 👉 String
• 👉 Boolean
• 👉 Undefined
• 👉 Null
• 👉 BigInt
• 👉 Symbol
Primitive Type উদাহরণ
• let a = 42;
• let b = "JavaScript";
• let c = true;
• let d;
• let e = null;
• let f = 12345678901234567890n;
• let g = Symbol("id");
Non-Primitive Data Types
• 👉 Object
• 👉 Array
• 👉 Function
Non-Primitive উদাহরণ
• let person = { name: "Ashik", age: 25 };
• let fruits = ["Apple", "Banana"];
• function greet() { console.log("Hello!"); }
typeof দিয়ে টাইপ চেক
• typeof "Hello" // "string"
• typeof 123 // "number"
• typeof true // "boolean"
• typeof undefined // "undefined"
• typeof null // "object"
• typeof {} // "object"
• typeof [] // "object"
• typeof function(){} // "function"
Common Confusions
• 🔸 typeof null → "object" (bug)
• 🔸 Array is a type of Object
• 🔸 typeof NaN → "number"
Practice Exercise
• let a;
• console.log(typeof a); // ?

• let b = null;
• console.log(typeof b); // ?

• let nums = [1, 2, 3];


• console.log(typeof nums); // ?
Q&A Ideas
• ✅ Primitive vs Non-Primitive এর পার্থক্য
• ✅ typeof null এর মান
• ✅ Function এর টাইপ কী?
Quiz Questions
• 1. Which is primitive?
• A. Object B. Array C. Symbol ✅ D. Function
• 2. typeof null?
• A. 'null' B. 'object' ✅ C. 'undefined' D. 'symbol'

You might also like