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 Master { | |
tenThousandHours(sweat) { | |
this.sweat = sweat; | |
} | |
grind() { | |
console.log(this.sweat); | |
} | |
} |
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 Master { | |
tenThousandHours(sweat) { | |
this.sweat = sweat; | |
} | |
grind() { | |
console.log(this.sweat); | |
} | |
} |
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 Master { | |
tenThousandHours(sweat) { | |
this.sweat = sweat; | |
} | |
grind() { | |
console.log(this.sweat); | |
} | |
} |
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 Master { | |
tenThousandHours(sweat) { | |
this.sweat = sweat; | |
} | |
grind() { | |
console.log(this.sweat); | |
} | |
} |
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
// Change this | |
grind() { | |
console.log(this.sweat); | |
}; | |
// into this | |
grind = () => { | |
console.log(this.sweat); | |
}; |
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 Master { | |
tenThousandHours(sweat) { | |
this.sweat = sweat; | |
} | |
grind = () => { | |
console.log(this.sweat); | |
} | |
} |
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
// to the left of .grind is yoda so yoda is this | |
const grind = yoda.grind; | |
// grind is now an arrow function and therefore | |
// looks to the above to find out what this is | |
grind(); |
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
// Use the following line in your CLI to initilize | |
// a React app called Nasa | |
create-react-app Nasa |
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
// Use the following line in your CLI | |
// Make sure you're in your app directory | |
// That would be Nasa for me | |
npm install axios |
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
import axios from 'axios' | |
// Create a KEY variable for the NASA API key you received earlier | |
// Make sure it's in quotations | |
const KEY = 'YOUR KEY' | |
// Create a nasa variable that we will use to perform our API request | |
// Axios is going to create a url for us that conforms to NASA's | |
// specifications | |
let nasa = axios.create({ |
OlderNewer