1Using a FOR loop, write a function addNumber which adds the argument n to each
2number in the array arr and returns the updated arr:
3const addNumber=(arr, n)=>{
4 let arr1=[];
5 for(let i=0;i<Math.max(arr.length);i++){
6 arr1.push((arr[i]||0)+n)
7 }
8 return arr1;
9}
10console.log(addNumber([4, 5, 6], 7)); // expected log [11, 12, 13]
1let firstNumbers = [1, 2, 3];
2let secondNumbers = [4, 5, 6];
3let merged = firstNumbers.concat(secondNumbers);
4console.log(merged); // [1, 2, 3, 4, 5, 6]