This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function map(array, callback) { | |
| const newArray = []; | |
| for (let i = 0; i < array.length; i++ ) { | |
| console.log("array[i], newArray[i]", array[i], newArray[i]); | |
| newArray.push(callback(array[i])); | |
| } | |
| return newArray; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| <h1> | |
| <span>R</span> | |
| <span>I</span> | |
| <span>P</span> | |
| <span>P</span> | |
| <span>L</span> | |
| <span>E</span> | |
| </h1> | |
| </body> |