I have some basic questions in javascript . I have posted the questions in Description

I have some basic questions in javascript . I have posted the questions in Description

Q1) Write a method to calculate the union of two sets.

Eg: set 1: [1,3,5,6,8,2,3,4], set 2: [1,10,2,5,6] – input

Result: [1,3,5,6,8,2,4,10] – output

Q2) Write a method to calculate the intersection of two sets.

Eg: set 1: [1,3,5,6,8,2,3,4], set 2: [1,10,2,5,6] – input

Result: [1,2,5,6] – output

Q3) sort persons in this below array as per their age (ascending order)

Eg : let persons = [{name: ‘john’,age: 25}, {name: ‘katy’,age: 14},

{name: ‘phil’,age: 45}, {name: ‘mahony’,age: 67}, {name: ‘robert’,age: 22}]; – Input

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper