JAVASCRIPT PLEASE
Posted: Fri Jul 08, 2022 6:44 am
JAVASCRIPT PLEASE
ix. Write function renderGrid to do the following 1. Initialize variable render to and empty string 2. Reference array grid, call function .forEach() 3. Function .forEach() receives one parameter, an anonymous function 4. Anonymous function receives one parameter, row a. In the anonymous function, append to variable render explicit HTML code '<div class="row"> b. Reference parameter row, call function .forEach c. Function.forEach() receives one parameter, an anonymous function d. Anonymous function receives two parameters, (letter, i)
i. In the anonymous function, append to variable render explicit HTML code `<span> ${letter} </span>` e. Append to variable render explicit HTML code '</div>' 5. Set variable container, innerHTML, equal to variable render
ix. Write function renderGrid to do the following 1. Initialize variable render to and empty string 2. Reference array grid, call function .forEach() 3. Function .forEach() receives one parameter, an anonymous function 4. Anonymous function receives one parameter, row a. In the anonymous function, append to variable render explicit HTML code '<div class="row"> b. Reference parameter row, call function .forEach c. Function.forEach() receives one parameter, an anonymous function d. Anonymous function receives two parameters, (letter, i)
i. In the anonymous function, append to variable render explicit HTML code `<span> ${letter} </span>` e. Append to variable render explicit HTML code '</div>' 5. Set variable container, innerHTML, equal to variable render