This file contains 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
// This test takes an array, loops through each top level index | |
// and logs an error if the index contains an array. | |
// Passes are tallied, and passes/fails are output at the end of the test. | |
const flattenTest = arr => { | |
// Define error message and initialize pass counter | |
const errorMessage = ind => `Index ${ind} contains an array`; | |
let passCount = 0; | |
OlderNewer