ES6 Set: Distinct Values of the Set | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

ES6 Set: Distinct Values of the Set

[SOLVED] You are making a program for a sports store warehouse. The warehouse currently has 7 types of sports equipment and plans to purchase more. The program you are given takes 3 new purchased item types as input. Write a program to add the new items to the given set, then calculate and output to the console the count of item types in the warehouse. https://code.sololearn.com/cDeiNZ7Y79n5/?ref=app

22nd Feb 2022, 6:42 AM
Tahiti🌍Castillo
Tahiti🌍Castillo - avatar
4 RĂ©ponses
+ 3
I think you probably meant to add <itemType> instead ... products.add( itemType ); count++;
22nd Feb 2022, 6:57 AM
Ipang
+ 1
Having trouble figuring out why it’s outputting a # too large.
22nd Feb 2022, 6:43 AM
Tahiti🌍Castillo
Tahiti🌍Castillo - avatar
+ 1
Ipang I’m learning from this error. I thank you very much!!!
22nd Feb 2022, 3:41 PM
Tahiti🌍Castillo
Tahiti🌍Castillo - avatar
0
Swati Kumari The exercise doesn’t ask for a discount or change in price. It just asks you to add 3 new items to a given set and then display the number of unique item types. I do thank you for offering help!
22nd Feb 2022, 3:44 PM
Tahiti🌍Castillo
Tahiti🌍Castillo - avatar