Question: Hello, I'm attempting to set up a function to scroll through the input array, checking for duplicates between the words that it contains on Javascript.
Hello, I'm attempting to set up a function to scroll through the input array, checking for duplicates between the words that it contains on Javascript. I am wondering, why is it not compiling?
I've set up two versions, please correct both of them and tell me why it its giving me an error.
First version:
Function duplicates (input) {
Set set = new HashSet(Arrays.asList(input));
if ( set.size()
return true;
else
return false;
}
Here is the second version:
Thank you!
index.js Console Shell 1 1 2 function duplicates (input){ Set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
