Simple JavaScript Task
Simple JavaScript Task
1. Create a function that will merge two arrays and return the result as a new array. Dynamic
input is required for users
Sample input: ar1 = [1, 2, 3]; ar2 = [4, 5, 6];
Expected output : 1,2,3,4,5,6
2. Create a function that will receive two arrays and will return an array with elements that are
in the first array but not in the second. Dynamic input is required for users using form.
Sample input: ar1 = [1, 2, 3, 7, 5, 3, 14]; ar2 = [-1, 4, 5, 6, 14];
Expected output : 1,2,3,7,3
3. Write a JavaScript function to capitalize the first letter of each word in a string using form.
Sample input ('javaScript string exercises')); Expected output "JavaScript String Exercises".
4. Write a JavaScript function to get the week end date.
5. Write a JavaScript program to calculate age.
6. Create a function that will add two positive numbers of indefinite size. The numbers are
received as strings and the result should be also provided as string.
Dynamic input is required. Sample input 2909034221912398942349
1290923909029309499
Output: 2910325145821428251848