Skip to content

Instantly share code, notes, and snippets.

View tadjohnston's full-sized avatar

Tad Johnston tadjohnston

View GitHub Profile
// 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)
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import Baz from 'baz'
class Foo extends Component {
static propTypes = {
list: PropTypes.array,
}
static defaultProps = {