Skip to content

Instantly share code, notes, and snippets.

@evgeniyworkbel
Created November 11, 2021 14:36
Show Gist options
  • Save evgeniyworkbel/978a5a34076f54a5aa4e14d1cb8fa715 to your computer and use it in GitHub Desktop.
Save evgeniyworkbel/978a5a34076f54a5aa4e14d1cb8fa715 to your computer and use it in GitHub Desktop.
Подготов. курс JS (code-basics.ru)
import { getParentFor } from 'hexlet-basics/got';
// мое 1-ое решение
// BEGIN (write your solution here)
const grandFatherOfJoffrey = getParentFor(getParentFor('Joffrey Baratheon'), 'father');
console.log(grandFatherOfJoffrey);
// END
// мое 2-ое решение
// BEGIN (write your solution here)
const momOfJoffrey = getParentFor('Joffrey Baratheon');
console.log(getParentFor(momOfJoffrey, 'father'));
// END
import { getParentFor } from 'hexlet-basics/got';
// BEGIN
const joffreyMom = getParentFor('Joffrey Baratheon');
console.log(getParentFor(joffreyMom, 'father'));
// END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment