Posts

Showing posts from July, 2021

Java Script Hacker Rank 2021 Certification (Chamion League Teams) Solution

Put this in your code as : const https = require('https'); const fetch = (url) => {   return new Promise((resolve, reject) => {     https       .get(url, (resp) => {         let data = '';         // A chunk of data has been recieved.         resp.on('data', (chunk) => {           data += chunk;         });         // The whole response has been received. Print out the result.         resp.on('end', () => {           resolve(JSON.parse(data));         });       })       .on('error', (err) => {         reject(err.message);       });   }); }; const getAPIURL = (year, page) => {   return `https://jsonmock.hackerrank.com/api/football_matches?competition=UEFA%20Champions%20Lea...