Created
January 17, 2016 04:29
-
-
Save palumbo/44fafcdb40e788f7ec25 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
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