FSR310723 - Please answer the following coding question

  1. 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]

  1. Write a JavaScript program to find duplicate values in a JavaScript array.

  2. 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]

  1. 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]

  1. Write a JavaScript script to empty an array while keeping the original.

  2. Write a JS code to print Even numbers in given array

  3. Write a JS code to delete all occurrence of element in given array

  4. Write a JS code to find the power of a number using for loop

  5. 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

  6. Write a JS code to find the no of digits in a number

  7. Write a JS code to calculate the sum of digits in a number

  8. Write a JS code to find the largest number in an array

  9. Write a JS code to print the Fibonacci series for a given value of N

  10. Write a JS code to print a pattern using for loop

12345

1234

123

12

1

  1. Write a JS code to print a pattern using for loop

    1

    121

    12321

    1234321

123454321

4 Likes

https://codepen.io/Mothukuru-Vishnu-vardhan/pen/abPygWM

https://codepen.io/VISWANATH-PALURU/pen/YzdrVYR