Question: i am getting this error in one of my code of Javascript, Css, and Html code assignment. This is my code: function loadArrays(dataJSON){ var studentList
function loadArrays(dataJSON){
var studentList = dataJSON.student;
for(let student of studentList){
console.log(student);
sArray.push(new Student(
student.name,
student.studentId,
student.login,
student.program,
student.homeCountry,
student.profileImage
));
}
function loadData() {
console.log("in function");
fetch("data/a1.json")
.then((res) => res.json())
.then((dataJSON) => {
console.log(dataJSON);
loadArrays(dataJSON);
loadView(sArray, true);
});
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
