Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
A lot of part of your code is redundant and can be done in O(logN).
You are checking unnecessary values on whether they are being prime.
You need not to pre-generate prime values beforehand
You need not to sort and remove duplicate entries
Remember that you only need information on the shared prime factor numbers between each numbers in the list.
Not true, last line would return false.
Sorry your code is wrong somewhere.
BTW before posting issues look at the top of the page to see how many people passed the kata (2732 in JS). When this number is high, high are chances that your code has a problem.
Cheers.