Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit 7f240a7

Browse files
committed
hw 6 getProfile fixed
1 parent 9cace33 commit 7f240a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lesson5/task.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Monster.prototype.attack = function(enemy) {
4949
if (!enemy.life) return (`${this.charClass} attacked, Hero killed`);
5050
return (`${this.charClass} attacked, done ${this.damage} damage to ${enemy.charClass}`);
5151
}
52-
};
52+
};
5353

5454
// GENERAL_ATTACK_MESSAGE
5555
// "CHARACTER_CLASS killed" - this action will kill target

src/lesson6/task.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const getClimate = function(planetName) {
1313
// Получить информацию (Object) о любом персонаже по имени
1414
// {name} – String
1515
const getProfile = function(name) {
16-
let request = `https://swapi.co/api/people/?search=Luke Skywalker`;
16+
let request = `https://swapi.co/api/people/?search=${name}`;
1717
let person = fetch(request)
1818
.then(response => response.json())
1919
.then(personObj => {

0 commit comments

Comments
 (0)