The naming of “val” is truly confusing, I suggest you name it “obj”. Check my code.
“JSON APIs and Ajax” is too compact and confusing. If you would expand it and teach it slowly it will be understandable. It’s the third time I’m doing these 7 exercises over and yet I don’t know how to connect the nodes in my mind to “Building a Random Quote Machine”.
Check https://www.freecodecamp.com/json/cats.json ; Really guys? Each of those objects inside the json does not seem to me like a “val”.
I fact each object contains 3 keys and values paired to them, and those end values should be called “val”.