ARTICLE AD BOX
I am trying to compartmentalize JavaScript code. I am using a Float32Array so I can use the .map() function. When I put the code that builds the array from a file in another function, how do I ensure that the datatype is returned/recognized?
var secondsArray = new Float32Array(); secondsArray = SomeFunction() ; secondsArray.map((start_time,index) => //more codeexception: secondsArry.map is not a function
The function:
async function SomeFunction() { // some stuff secondsArray = new Float32Array(timeArray.length-1); return secondsArray; }