iam just now learning the asynchronous javascript.I have doubt in fetch API in javascript.
fetch(`./student.json`)
.then((response) => {
console.log(`resolved , ${response}`);
})
.catch((error) => {
console.log(`rejected , ${error}`);
});
and my json file is here 'student.json'
[
{
"name":"dhinesh",
"college":"AAMEC",
"dept":"CSE"
},
{
"name":"niranjan",
"college":"AAMEC",
"dept":"EEE"
}
]
and my output is " resovle, [object Response]"
i don't see any response object iam expecting the output is like this enter image description here