updated to folders in master (#1)
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
const name = 'Freddy'
|
||||
typeof name === 'string'
|
||||
|
||||
if (!('serviceWorker' in navigator)) {
|
||||
// you have an old browser :-(
|
||||
}
|
||||
|
||||
const greeting = 'hello'
|
||||
console.log(`${greeting} world!`)
|
||||
;[(1, 2, 3)].forEach(x => console.log(x))
|
||||
@@ -1,22 +0,0 @@
|
||||
// @flow
|
||||
function add(a: number, b: number): number {
|
||||
return a + b
|
||||
}
|
||||
|
||||
type User = {
|
||||
name: {
|
||||
first: string,
|
||||
middle: string,
|
||||
last: string,
|
||||
},
|
||||
}
|
||||
function getFullName(user: User): string {
|
||||
const {
|
||||
name: {first, middle, last},
|
||||
} = user
|
||||
return [first, middle, last].filter(Boolean).join('')
|
||||
}
|
||||
|
||||
add(1, 2)
|
||||
|
||||
getFullName({name: {first: 'Joe', middle: 'Bud', last: 'Matthews'}})
|
||||
Reference in New Issue
Block a user