-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecma_script.js
61 lines (47 loc) · 852 Bytes
/
ecma_script.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
49
50
51
52
53
54
55
56
57
58
59
60
61
//ECMA SCRIPT or ES6 2015
// let,const, class, Template string
/* let a=30;
function abc(){
let a=56;
console.log(a);
}
console.log(a);
abc(); */
/*
const a = {
name:"sam",
age:23
}
a.email="[email protected]";
a.age=34;
console.log(a);
*/
/* var name="pradeep";
age=34;
//console.log("hi " +name + "you are " + age);
console.log(`hi ${name} + you are ${age}`);
*/
class Users{
/* constructor(){
this.name="samy";
this.age=34;
}*/
constructor(name,age){
this.name=name;
this.age=age;
}
getName(){
this.email="info@codubux";
return this.name;
}
getAge(){
return this.age;
}
getEmail(){
return this.email;
}
}
var user = new Users("samy wamy", 452);
user.getName();
console.log(user.getEmail());
console.log(user.getAge());