At Any Rate explainer


The aim of this puzzle: Log all the hotel ratings of grasslandHotels to the console

Walkthrough of the solution: The grasslandHotels variable stores an array of hotel review objects. A normal for...of loop can be used to log the .rating property of each element. At the bottom of your code, create a new for...of loop that goes through each element of grasslandHotels. Inside the loop, the .rating property of each element should get printed using console.log().

Sample code solution:
(Tap below to reveal)

import { getData, findHotels } from '';

let grasslandHotels = getData('Grassland', findHotels);
for (let element of grasslandHotels) {

JavaScript Concepts: Callback Functions, Calling Functions, Code Block (for loop), console.log(), import


The UI would not allow me to do
for (let x of y)
I had to use to get the code to pass
for (var x of y)
see attached


Thanks for flagging!