Skip to content

Commit e90238d

Browse files
committed
Write a JavaScript script that fetches the character name from this URL: https://swapi-api.alx-tools.com/api/people/5/?format=json
1 parent f5655df commit e90238d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$(document).ready(function () {
2+
$.getJSON(
3+
"https://swapi-api.alx-tools.com/api/people/5/?format=json",
4+
function (data) {
5+
$("DIV#character").text(data.name);
6+
}
7+
);
8+
});

0 commit comments

Comments
 (0)