- There are two arrays with individual values. Write a JavaScript program to compute the sum of each individual index value in the given array.
Sample array :
array1 = [1,0,2,3,4];
array2 = [3,5,6,7,8,13];
Expected Output :
[4, 5, 8, 10, 12, 13]
-
Write a JavaScript program to find duplicate values in a JavaScript array.
-
Write a JavaScript program to compute the union of two arrays.
Sample Data :
console.log(union([1, 2, 3], [100, 2, 1, 10]));
[1, 2, 3, 10, 100]
- Write a JavaScript function to remove a specific element from an array.
Test data :
console.log(remove_array_element([2, 5, 9, 6], 5));
[2, 9, 6]
-
Write a JavaScript script to empty an array while keeping the original.
-
Write a JS code to print Even numbers in given array
-
Write a JS code to delete all occurrence of element in given array
-
Write a JS code to find the power of a number using for loop
-
Write a JS code to print a pattern using for loop
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
-
Write a JS code to find the no of digits in a number
-
Write a JS code to calculate the sum of digits in a number
-
Write a JS code to find the largest number in an array
-
Write a JS code to print the Fibonacci series for a given value of N
-
Write a JS code to print a pattern using for loop
12345
1234
123
12
1
-
Write a JS code to print a pattern using for loop
1
121
12321
1234321
123454321