This file contains hidden or 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
version: "3.1" | |
services: | |
db: | |
container_name: mongoDB | |
image: mongo:latest | |
restart: always | |
volumes: | |
- ./pokeData:/data/db | |
environment: |
This file contains hidden or 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 getCalculatedRoutes(routes: Array<any>): Promise<any> { | |
return Promise.all( | |
routes.map(async (route: any) => { | |
const distance = await getDistance(); | |
route.distance = distance; | |
route.cost = calculateCost(distance); | |
return route; | |
}) | |
); | |
} |
This file contains hidden or 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
version: '3.1' | |
services: | |
db: | |
container_name: Mongo-db | |
image: mongo:latest | |
restart: always | |
volumes: | |
- ./myData:/data/db | |
environment: |
This file contains hidden or 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
version: '3.1' | |
services: | |
db: | |
container_name: Mongo-db | |
image: mongo:latest | |
restart: always | |
volumes: | |
- ./myData:/data/db | |
env_file: |
This file contains hidden or 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
version: '3.1' | |
services: | |
db: | |
container_name: Mongo-db | |
image: mongo:latest | |
restart: always | |
volumes: | |
- ./myData:/data/db | |
environment: |
This file contains hidden or 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 pokemon = ['Squirtle', 'Bulbasur', 'Charmander']; | |
const morePokemon = ['Totodile', 'Chikorita', 'Cyndaquil']; | |
const pokedex = [...pokemon, ...morePokemon]; | |
console.log(pokedex); //Result: [ 'Squirtle', 'Bulbasur', 'Charmander', 'Totodile', 'Chikorita', 'Cyndaquil' ] |
This file contains hidden or 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 pokemon = [ | |
{ name: 'Squirtle', type: 'Water' }, | |
{ name: 'Bulbasur', type: 'Plant' }]; | |
const morePokemon = [{ name: 'Charmander', type: 'Fire' }]; | |
const pokedex = [...pokemon, ...morePokemon]; | |
console.log(pokedex); //Result: [ { name: 'Squirtle', type: 'Water' }, { name: 'Bulbasur', type: 'Plant' }, { name: 'Charmander', type: 'Fire' } ] |
This file contains hidden or 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 pokemon = ['Squirtle', 'Bulbasur']; | |
const charmander = 'Charmander'; | |
const cyndaquil = 'Cyndaquil'; | |
const pokedex = [...pokemon, charmander, cyndaquil]; | |
console.log(pokedex); //Result: [ 'Squirtle', 'Bulbasur', 'Charmander', 'Cyndaquil' ] |
This file contains hidden or 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 numbers = [1, 2, 3]; | |
console.log(...numbers); //Result: 1 2 3 | |
const pokemon = ['Squirtle', 'Bulbasur', 'Charmander']; | |
console.log(...pokemon); //Squirtle Bulbasur Charmander | |
const pokedex = [ | |
{ name: 'Squirtle', type: 'Water' }, | |
{ name: 'Bulbasur', type: 'Plant' }, | |
{ name: 'Charmander', type: 'Fire' } |
This file contains hidden or 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 basicSquirtle = { name: 'Squirtle', type: 'Water' }; | |
const fullSquirtle = { | |
...basicSquirtle, | |
species: 'Tiny Turtle Pokemon', | |
evolution: 'Wartortle' | |
}; | |
console.log(fullSquirtle); //Result: { name: 'Squirtle', type: 'Water', species: 'Tiny Turtle Pokemon', evolution: 'Wartortle' } |
OlderNewer