-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdemo.js
49 lines (33 loc) · 1.51 KB
/
demo.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
44
45
46
47
48
// let movies = [
// {
// name:"Avengers Infinity War",
// rating:8.7,
// poster:"https://m.media-amazon.com/images/M/MV5BMjMxNjY2MDU1OV5BMl5BanBnXkFtZTgwNzY1MTUwNTM@._V1_.jpg",
// description:"he Avengers must stop Thanos, an intergalactic warlord, from getting his hands on all the infinity stones."
// },
// {
// name:"RRR",
// rating:7.8,
// poster:"https://m.media-amazon.com/images/M/MV5BODUwNDNjYzctODUxNy00ZTA2LWIyYTEtMDc5Y2E5ZjBmNTMzXkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_.jpg",
// description:"A fearless revolutionary and an officer in the British force, who once shared a deep bond, decide to join forces and chart out an inspirational path of freedom against the despotic rulers."
// }
// ]
// console.log(movies[0].name);
// console.log(movies[0].rating);
// for(let i=0;i<movies.length;i++)
// {
// console.log(movies[i].name);
// }
// functions
// var function scoped
// let block scoped
// function doSomething(name,age)
// {
// console.log("Hello function "+name+" and the age is "+age);
// }
// doSomething=()=>{
// console.log("Hello function")
// };
// doSomething("Saurabh",26);
// // console.log("Some code");
// doSomething("Soyal",23);