Created
March 17, 2014 05:55
-
-
Save JesterMan/9594599 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
<head></head> | |
<body> | |
<script> | |
var firstWords= ["cinema", "host", "aba", "train"]; | |
var secondWords=[ "cieman", "shot", "bab", "rain"]; | |
var anaTest = function(){ | |
var tester = function(){ | |
if (firstTest===secondTest){ | |
console.log('1'+ '\n'); | |
} | |
else { | |
console.log('0'+ '\n'); | |
} | |
}; | |
for (var i = 0; i < firstWords.length; i++) { | |
var firstTest =firstWords[i].split("").sort().join(''), | |
secondTest =secondWords[i].split("").sort().join(''); | |
tester(); | |
}; | |
}(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment