Created
November 11, 2021 08:27
-
-
Save evgeniyworkbel/1c208f38310e4cbd93715b3f7bc28b85 to your computer and use it in GitHub Desktop.
Подготов. курс JS (code-basics.ru)
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
// 1-ое решение | |
import { calculateDistanceBetweenTowns } from 'hexlet-basics/got'; | |
const from = 'The Twins'; | |
const to = 'The Eyrie'; | |
// BEGIN (write your solution here) | |
const route = `${from}-${to}`; | |
console.log(calculateDistanceBetweenTowns(route)); | |
// END | |
//2-ое решение | |
import { calculateDistanceBetweenTowns } from 'hexlet-basics/got'; | |
const from = 'The Twins'; | |
const to = 'The Eyrie'; | |
// BEGIN (write your solution here) | |
console.log(calculateDistanceBetweenTowns(`${from}-${to}`)); | |
// END |
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 { calculateDistanceBetweenTowns } from 'hexlet-basics/got'; | |
const from = 'The Twins'; | |
const to = 'The Eyrie'; | |
// BEGIN | |
const distance = calculateDistanceBetweenTowns(`${from}-${to}`); | |
console.log(distance); | |
// END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment