Created
March 31, 2017 14:17
-
-
Save Obre/56344a1a0e0ac90ee407dd5123762239 to your computer and use it in GitHub Desktop.
This file contains 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
function solution(myArr) { | |
var myArr = [9, 3, 9, 3, 9, 7, 9]; | |
var leng = myArr.length; | |
var result = []; | |
var leftObj = {}; | |
var i; | |
for (i = 0; i < leng; i++) { | |
leftObj[myArr[i]] = 0; | |
} | |
for (i in leftObj) { | |
result.push(i); | |
} | |
console.log(result); | |
} | |
solution(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment