Skip to content

Instantly share code, notes, and snippets.

@JesterMan
Created March 17, 2014 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JesterMan/9594599 to your computer and use it in GitHub Desktop.
Save JesterMan/9594599 to your computer and use it in GitHub Desktop.
<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