skip to Main Content

Jquery ajax – Call Ajax export function return value

When i call my function with a returning export function getChampion(id, country) { $.ajax({ type: "GET", url: `http://ddragon.leagueoflegends.com/cdn/9.24.2/data/${country}/champion.json`, dataType: "json", success: function(data) { console.log(data); idToChampion(data, id); } }); } // Return the ChampionId function idToChampion(data, theId) { let resultObject =…

VIEW QUESTION
Back To Top
Search