Moron Test v5

v5.js How does the new main function access the values of icon and i? How are those values passed from the moment created in the event listener to the scene level object’s main function? FYI this is an example of “closure.” Closure is the passing of variable values from an “outer” function to an “inner” […]

Moron Test pt2

moron.js Describe the process for creating elements using JS. How do you post that newly created element to your webpage? In order to create elements using JS I created an icon data structure. The structure included an array of objects stating the class, color, content etc. for each icon. These were saved in variable. var […]

Moron Test pt 3

Version 3  .js Why do we need to call the iconListener function after we’ve cleared the iconSpace and mapped our new icon <i> elements to that space? Why do we need to follow this three step process: clear <i> elements, add new <i>elements, add event listeners to <i> elements? The iconListener function needs to be called after clearing the iconSpace and mapped out new icons because if […]