Simple example code print array values.
You can also use the spread syntax
... to copy the items into a single array. For example,
const arr1 = ['one', 'two']; const arr2 = [...arr1, 'three', 'four', 'five']; console.log(arr2);
Output: [“one”, “two”, “three”, “four”, “five”]
Do comment if you have any doubts or suggestions on this JS basic topic.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.