Skip to content

Instantly share code, notes, and snippets.

@cmstead
Created May 12, 2015 17:22
Show Gist options
  • Save cmstead/8e40093cc85d841fca09 to your computer and use it in GitHub Desktop.
Save cmstead/8e40093cc85d841fca09 to your computer and use it in GitHub Desktop.
Bad test example
//Write a function that compares two values and returns true if they are a match and false if they are not.
function compare(x,y)
{
var temp1 = typeof(x);
var temp2 = typeof(y);
if(temp1 == temp2)
{
alert("true");
}
else{
alert("false");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment