Skip to content

Commit c9d65d9

Browse files
authored
datatypeSummary
1 parent 21ff05f commit c9d65d9

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

01_basics/data_types_Summary.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*datatypes are manly categorized in two types primitive and non primitive based on how data should be store on memory*/
2+
3+
//Primitive datatypes
4+
/* 7 types - String,Number , Boolean, null, undefined, Symbol, BigInt
5+
6+
These all datatypes are also called call by value means original reference of memory should not be provided only copy shouldbe provided or all changes done in copy not in original
7+
8+
*/
9+
10+
11+
/*Reference (NoN Primitive)
12+
Arrays, Objects, Functions
13+
14+
in these reference provided
15+
*/
16+
const score = 100;
17+
const scoreValue = 100.3;
18+
19+
const isLoggedIn = false;
20+
21+
const outsideTemp = null;
22+
let userEmail;
23+
24+
const id = Symbol('123')
25+
const anotherId = Symbol('123')
26+
27+
console.log(id === anotherId);
28+
29+
const bigNumber = 345654355667889990282 n;
30+
31+
// javascript is dynamically typed languageee
32+
33+
const heros = ["shaktiman", "naagraj", "doga"]; // array
34+
35+
const myObj = {
36+
name: "sakshi",
37+
ag: 22,
38+
}
39+
const myfunction = function() {
40+
console.log("Hello World");
41+
}
42+
43+
// how to identify datatype
44+
45+
46+
47+
console.log(typeof bigNumber);
48+
console.log(typeof outsideTemp);
49+
console.log(typeof myfunction);

0 commit comments

Comments
 (0)