|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
271 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | function copyArray(source, array) {
|
|---|
| 4 | const length = source.length;
|
|---|
| 5 | if (array == null) {
|
|---|
| 6 | array = Array(length);
|
|---|
| 7 | }
|
|---|
| 8 | for (let i = 0; i < length; i++) {
|
|---|
| 9 | array[i] = source[i];
|
|---|
| 10 | }
|
|---|
| 11 | return array;
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | module.exports = copyArray;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.