-
Notifications
You must be signed in to change notification settings - Fork 0
/
datatypes-summary.js
43 lines (37 loc) · 1.06 KB
/
datatypes-summary.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// primitive data types
// 7 types : string,number,boolean,null,undefined,symbol,bigint
// Javascript is a dynamically typed language
// reference(Non primitive)
// Array,Objects,functions
const score = 100
const scoreValue = 100.3
const isloggedIn = false
let userEmail;
const id = Symbol('123')
const anotherId = Symbol('123')
// console.log(id===anotherId);
const bigNumber = 7664657567765765673546756n
const countries = ["India","America","Russia","Italy"]
let myObj = {
name:"Gauri",
age : 13
}
const myFunction = function(){
console.log("Hello World");
}
// function in javascript
//****************************************************************/
//Stack(primitive),heap memory(non-primitive)=>two types
let myRepoName = "GauriSonawane"
let anotherName = myRepoName
anotherName = "technology"
console.log(anotherName);
console.log(myRepoName);
let user = {
email:"[email protected]",
upi:"mbhuhf"
}
let user2 = user
user2.email = "[email protected]"
console.log(user.email);
console.log(user2.email);