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
Its a typo. Simply use then instead of than and .json() instead of .JSON()
then
than
.json()
.JSON()
fetch(URL).then(res => { console.log(res.json()) })
learn more here
You have a spelling error. It should be .then not .than