-
Notifications
You must be signed in to change notification settings - Fork 9
/
sample.js
76 lines (58 loc) · 1.25 KB
/
sample.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
var moment = require('moment');
function firstPrint(someparam) {
simplePrint(someparam);
}
function simplePrint (someparam) {
console.log(someparam)
}
const firstTest = (dog) => {
console.log(dog.attr2)
};
class BasicDog {
attr1 = "mammal"
attr2 = "dog"
test() {
const attr3 = "test";
this.attr1 = this.attr1 + this.attr2;
}
}
class Dog extends BasicDog {
constructor(testName) {
super();
console.log(testName);
}
fun(argName) {
this.test();
console.log("I'm a", this.attr1)
console.log(argName);
}
}
function testone() {
var name = "Pandurang";
var Rodger = new Dog(name);
Rodger.fun(name);
console.log(name);
firstPrint(name);
simplePrint(name);
((firstName) => {
var date = moment().format(firstName);
console.log(date);
})(name);
}
testone();
const wrapperFunction = () => {
const testArrow = (name) => {
console.log(name);
}
const externalfunc = require('./sample/one/sampleone')
const testtwo = () => {
var name = "Pandurang-external";
var wrapperObj = {
name_test : name
}
console.log(wrapperObj);
externalfunc(wrapperObj);
return testArrow(wrapperObj);
}
testtwo();
}