This file contains 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
const wait = (delay) => { | |
return new Promise(resolve => setTimeout(resolve, delay)); | |
} | |
async function tryWaitFunction () { | |
console.log('スタート') | |
await wait(1000); | |
console.log('途中') | |
await wait(1000); | |
console.log('終わり') |
This file contains 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
// クラスの定義 | |
class User { | |
constructor(name, email) { | |
this.name = name; | |
this.email = email; | |
} | |
save() { | |
console.log('DBにユーザー情報を保存してPromiseを返す、ていで。'); |
This file contains 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
/* 画像ファイルの指定 */ | |
background-image: url(images/background-photo.jpg); | |
/* 画像を常に天地左右の中央に配置 */ | |
background-position: center center; | |
/* 画像をタイル状に繰り返し表示しない */ | |
background-repeat: no-repeat; | |
/* コンテンツの高さが画像の高さより大きい時、動かないように固定 */ |