Created
October 1, 2017 18:09
-
-
Save johndavedecano/c1d8b55377fb96311536f4433fb6c9f1 to your computer and use it in GitHub Desktop.
EXAMS - DISTINCT VALUES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
function solution(A) { | |
// write your code in JavaScript (Node.js 6.4.0) | |
return A.filter((x, y, z) => z.indexOf(x) === y).length; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment