1: Create a file named dedup.js. Write a program that removes duplicates from an array. The program should be able to read an unspecified number of numbers input by the user. The user should enter a negative number when they are done entering scores. The program should remove all duplicates from the array and then iterate over the new array and display it. 2: Create a file named dedeup_2.js. Modify your dedup program and prompt the user to enter a number n. Remove all elements from the array that occur more than n times. i need to write program with  const readline = require('readline');

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 16PE
icon
Related questions
Question

1: Create a file named dedup.js. Write a program that removes duplicates from an array. The program should be able to read an unspecified number of numbers input by the user. The user should enter a negative number when they are done entering scores. The program should remove all duplicates from the array and then iterate over the new array and display it.

2: Create a file named dedeup_2.js. Modify your dedup program and prompt the user to enter a number n. Remove all elements from the array that occur more than n times.

i need to write program with 

const readline = require('readline');
Expert Solution
steps

Step by step

Solved in 6 steps with 6 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning