MCPcopy Create free account
hub / github.com/AyushSaini00/60minuteJavaScript / url

Function url

Superhero-Card/app.js:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const combatEl = document.getElementById('combat');
12
13function url(){
14 let randomId = Math.floor(Math.random() * 731) + 1; //random integer b/w 1 and 731
15 let api = `https://cdn.jsdelivr.net/gh/akabab/superhero-api@0.3.0/api/id/${randomId}.json`;
16 getInfo(api);
17}
18
19function getInfo(apiURL){
20 fetch(apiURL)

Callers 1

getInfoFunction · 0.85

Calls 1

getInfoFunction · 0.85

Tested by

no test coverage detected