Skip to content

Instantly share code, notes, and snippets.

@palumbo
Created January 17, 2016 04:29
Show Gist options
  • Save palumbo/44fafcdb40e788f7ec25 to your computer and use it in GitHub Desktop.
Save palumbo/44fafcdb40e788f7ec25 to your computer and use it in GitHub Desktop.
var pageNames = ['Home', 'About Us', 'JavaScript Playground', 'Contact Us'];
for (var i = 0; i <= pageNames.length; i++) {
var currentPageTitle = pageName[i];
if (currentPageTitle === document.title) {
console.log("We are here: " + currentPageTitle);
} else {
console.log("We are NOT here: " + currentPageTitle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment