-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
38 lines (37 loc) · 894 Bytes
/
script.js
File metadata and controls
38 lines (37 loc) · 894 Bytes
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
//constructor func
// function abc (){
// this.age = 20,
// this.name = "john",
// this.color = "white";
// }
// var a = new abc ();
// another ex of constructor func
// function circularbutton (color) {
// this.radius = 2,
// this.color = red,
// this.press = true;
// }
// var greenbtn = new circularbutton("green");
// var redbtn = new circularbutton("red");
//normal function
// function normal (){
// console.log("this is a normal func");
// }
// normal ();
// //IIFE (immediately invoked function expression)
// ( function (){ //this is a simple iife
// console.log("this is an iife");
// }) ();
// //named iife ex
// (function namediife (){
// console.log("this is a named iife");
// }) ();
var me = {
name: "kaif",
age: 20,
}
var engg = {
studies: true,
passedExam: true,
}
engg.__proto__=me;