Last active
January 23, 2020 06:35
-
-
Save kampana/7d493949add6ad279759cde74320fe30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function question1() { | |
setTimeout( () => { | |
console.log('Hello'); | |
}); | |
console.log('World'); | |
// Output? | |
} | |
function question2() { | |
let obj = { | |
text: 'Hello', | |
myFunction : function() { | |
console.log(this.text); | |
} | |
} | |
obj.myFunction(); // Output? | |
let myOtherFunction = obj.myFunction; | |
myOtherFunction(); // Output? Why? | |
let data = { | |
name: 'Foo', | |
family: 'Bar' | |
} | |
console.log(data.family) // Runtime complexity? | |
let arr = [1,2,3,4,5]; | |
console.log(arr.filter( item => item > 3)) // Output? Runtime? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment