October 2018
Intermediate to advanced
500 pages
12h 40m
English
Let's cover these changes in detail. We have created a new JavaScript module, Lights.js, that has two objects:
LightsManager also contains the getArray method to flatten the arrays of properties by type:
getArray(type) { return this.list.reduce((result, light) => { result = result.concat(light[type]); return result; }, []);}
This will be useful when we use uniform arrays later on.