+ 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 Answers
+ 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