Use ES6-style for...of loop
Use ES6-style for...of loop

The shelf-searching logic depends on the order in which the shelves are checked. However, the for...in loop does not guarantee order.

We can also use Array.prototype.forEach() but we would need to tweak the caller to supply a callback.
smu-libraries/map_it