-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirst.js
More file actions
62 lines (59 loc) · 1.36 KB
/
first.js
File metadata and controls
62 lines (59 loc) · 1.36 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Hello World
console.log("Hello World");
// variables
let fullName = "Tony Stark";
let age = 10;
let price = 99.99;
let x = null;
let y = undefined;
let z = true;// Boolean
let a = BigInt("123");
let b = Symbol("Hello");
console.log(fullName + " " + age + " " + price);
// Var , Let and Constant
var Age = 10;
var Age = 20;
var Age = 80;
console.log(Age);
let Price = 100;
Price = 200;
Price = 300;
console.log(Price);
const PI = 3.4;
// const PI; Dont have initilizer
// const PI = 4; Error
// PI = 4; Error
console.log(PI);
typeof PI;
// Objects
const student = {
fullName: 'Rahul Kumar',
age: 20,
cgpa: 8.2,
isPass: true,
};
console.log(student);
console.log(student.age);
console.log(student["cgpa"]);
student.fullName = 'Shouvik Mistry';//Const Object Value can be change but const variable can not changed
console.log(student.fullName);
//Let's Practice
// Q1. Create a const object called "product" to store information shown in the picture.
const product ={
title: "Ball pen",
rating: 4,
offer: 5,
price: 270,
};
console.log(product);
//Q2. Create a const object called "profile" to store information shown in the picture.
const instagram={
userName: "Shradha Khapra",
post: 196,
folllower: 569000,
following: 4,
isFollo: true,
bio :"Apna College",
};
console.log(instagram);
console.log(typeof instagram.userName);