0% found this document useful (0 votes)
7 views

Simple JavaScript Task

The document outlines a series of JavaScript tasks that require the creation of functions for various operations, including merging arrays, finding unique elements, capitalizing words, calculating weekend dates, calculating age, and adding large numbers as strings. Each task specifies the need for dynamic user input and provides sample inputs and expected outputs. The tasks aim to enhance JavaScript programming skills through practical exercises.

Uploaded by

AMAN KUMAR SINGH
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Simple JavaScript Task

The document outlines a series of JavaScript tasks that require the creation of functions for various operations, including merging arrays, finding unique elements, capitalizing words, calculating weekend dates, calculating age, and adding large numbers as strings. Each task specifies the need for dynamic user input and provides sample inputs and expected outputs. The tasks aim to enhance JavaScript programming skills through practical exercises.

Uploaded by

AMAN KUMAR SINGH
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like