A
A
Alexey2015-12-07 12:28:59
JavaScript
Alexey, 2015-12-07 12:28:59

How to add map method to TypedArray in browsers other than Mozilla 38+?

Code example:

"use strict";
var arrayOfInitialPositions = ;
var lambdaDistance = [0.005, 1.005, 2.005];
for (var i = 0, len = arrayOfInitialPositions.length-1; i < len-1; i++)
{
arrayOfInitialPositions[i].map(function(item,j,array){ return (arrayOfInitialPositions[i+1][j] * lambdaDistance[i]) });
}

In Mozilla 38+ everything will work fine, in other browsers there will be an error.
https://developer.mozilla.org/en-US/docs/Web/JavaS...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
amatory10, 2015-12-07
@amatory10

do you have a lot of mistakes?
everything works in chrome.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question