Skip to content

Instantly share code, notes, and snippets.

@tadjohnston
Last active May 6, 2021 19:24
Show Gist options
  • Save tadjohnston/e4f992b8e74ce4c9e27242721b976016 to your computer and use it in GitHub Desktop.
Save tadjohnston/e4f992b8e74ce4c9e27242721b976016 to your computer and use it in GitHub Desktop.
// functions
// explain the difference between these two functions in regards to what they would output in a stack trace.
const Foo = () => { console.log('bar') }
function Foo() {
console.log('bar')
}
// explain what a setTimeout does, what is the difference between these two
window.setTimout(() => console.log('bar'), 5000)
window.setTimout(() => console.log('bar'), 0)
// objects
cosnt foo = {
bar: 'baz',
}
// vars
// difference between let and foo
let foo = 'bar'
const foo = 'bar'
const foo = 'bar'
function Test() {
const foo = 'baz'
}
// async
async function Foo() {
await console.log('bar')
}
Promise.all([Foo()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment