I hereby claim:
- I am lspdv on github.
- I am lspdv (https://keybase.io/lspdv) on keybase.
- I have a public key ASCnWdixiniD6qPmm-o1PDJjmk840P8B0WH1muGjzfhFiAo
To claim this, I am signing this object:
//Given the following code, I understand what the output will be | |
//Please answer fill only to the registration form for MSD Code Academy :-) | |
const obj = { | |
name: 'John', | |
getName () { | |
return this.name; | |
} | |
}; | |
const name1 = obj.getName(); |
//How would you change the second line in the following example so that it prints numbers 0, 1, 2, 3 in this order? | |
//Please answer fill only to the registration form for MSD Code Academy :-) | |
for (var i = 0; i < 4; i++) { | |
setTimeout(() => console.log(i), 0) | |
} | |
//A: By changing line 2) ... (function(number) { setTimeout(() => console.log(number), 0)})(i) | |
//B: By changing line 1) ... for (let i = 0; i < 4; i++) { | |
//C: By changing line 2) ... var temp = i; setTimeout(() => console.log(temp), 0) | |
//D: By changing line 2) ... setTimeout((i) => console.log(i), 0) |
//Finish line `var sayHello = ` so the whole code example prints "Hello John" to the console | |
//Please answer fill only to the registration form for MSD Code Academy :-) | |
var hello = { | |
name: 'John', | |
sayHello: function() { | |
return 'Hello ' + this.name | |
} | |
} | |
var sayHello = ... |
I hereby claim:
To claim this, I am signing this object: