67
JavaScript TypedArray set() Method
The JavaScript set() method is used to store values into the given array.
Syntax:
Parameters:
It accepts two parameters which is described below.
Array: The array from which to copy values. All the values from the source array are copied into the target array.
Index(Offset):At which position to begin writing values from the source array. It is optional and the default value is (0).
Return value:
A new updated array.
Browser Support:
Chrome | 7.0 |
Safari | 5.1 |
Firefox | 4.0 |
Opera | 11.6 |
Example
JavaScript TypedArray set() Method
Output:
0,0,1,2,3,4,0,0
Next TopicJavaScript TypedArray Object