Answers for "how to fetch data from another website in javascript"

0

how to fetch data from another website in javascript

const fetched_data = [];

//replace with url you want to fetch
fetch('https://url_to_fetch')
  .then(response => response.json())
  .then(data =>  fetched_data = data)
Posted by: Guest on May-09-2022

Code answers related to "how to fetch data from another website in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language