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
function myTemplate() {} |
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 ALGOLIA_PLACES = "https://places-dsn.algolia.net/1/places/query" | |
//const searchBody = (query) => `{"params":"hitsPerPage=5&language=en&query=${query}"}` | |
const searchBody = (query) => { | |
return JSON.stringify({ | |
"params":`hitsPerPage=5&language=en&query=${query}` | |
}) | |
} |
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
/* | |
<li> | |
The name of my movie | |
<img href="" /> | |
</li>*/ | |
const omdbUrl = (query) => `http://www.omdbapi.com/?s=${query}&apikey=adf1f2d7` | |
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
/* | |
<li> | |
The name of my movie | |
<img href="" /> | |
</li>*/ | |
const omdbUrl = (query) => `http://www.omdbapi.com/?s=${query}&apikey=adf1f2d7` | |
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 authorization = "Bearer sk_c25cc80d2eb82759b32f9bd53204af89"; | |
// TODO | |
const fetchData = (email) => { | |
fetch(`https://person.clearbit.com/v2/combined/find?email=${email}`, { | |
headers: new Headers({ | |
Authorization: authorization | |
}) | |
}) |
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 garageName = 'montreal247' | |
const displayCar = (car) => { | |
const carList = document.querySelector('.cars-list') | |
carList.insertAdjacentHTML('beforeend', ` | |
<div class="car"> | |
<div class="car-image"> | |
<img src="http://loremflickr.com/280/280/Ferrari 308 GTS" /> | |
</div> |
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
myTemplate`Hello !` |
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 externValue = "Timothee" | |
myTemplate`Hello ! ${externValue}` |
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
myTemplate`Hello,${"Timothee"},World` |
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
["Hello,", ",World"] |