Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
javascript fetch api not working and giving error

i am using javascript to call a url. but is is giving me error in chrome console (F12)

please help me.

i expected a result

fetch(url).than((res) => {
  console.log(res.JSON())
})

but got an error instead

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Its a typo. Simply use then instead of than and .json() instead of .JSON()

fetch(URL).then(res => {
  console.log(res.json())
})

learn more here

about 4 years ago · Juan Pablo Isaza Report

0

You have a spelling error. It should be .then not .than

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!