The JavaScript Array concat() Method is used to merge two or more arrays together. This method does not alter the original arrays passed as arguments. but instead return new Array. let newArray1 = oldArray.concat() let newArray2 = oldArray.concat(value0) let newArray3 = oldArray.concat(value0,value1) ....... ....... let newArray = oldArray.concat(value1 , [ value2, [ ...,[ valueN]]]) -------------------------------- Description The join() method returns an array as a string. The join() method does not change the original array. Any separator can be specified. The default is comma (,). <! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta http-equiv = "X-UA-Compatible" content = "IE=edge" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title >Document</ title > </ head > < body > ...
Comments
Post a Comment