Last active
August 21, 2017 13:07
-
-
Save jakelacey2012/e1fbc255937c45ffcab9c6180e25fec7 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
// create something which returns a boolean, telling me if all the objects in the array are valid | |
const x = [ | |
{ y: 10, z: 22 }, | |
{ y: 2, z: 15 }, | |
{ y: 3, z: 10 }, | |
{ y: 123123123, z: 100 }, | |
]; | |
// x.every(i => i.y && i.z); is a good answer... | |
const f = () => { | |
console.log('A') | |
setTimeout(function() { | |
console.log('C'); | |
}, 0); | |
const promise = new Promise(function(resolve, reject) { | |
resolve('B'); | |
}); | |
promise.then(d => console.log(d)); | |
console.log('D'); | |
} | |
f(); | |
// another js question. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment