Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.