#Implementing the Konami Code
The Konami Code is a cheat code that appears in many early Konami video games. During the title screen before the game demo begins, the player can press the following sequence of buttons on the game controller to enable the cheat:
###↑ ↑ ↓ ↓ ← → ← → B A [Start]
The code has also found a place in popular culture as a reference to the third generation of video game consoles, and is present as an Easter egg on a number of Web sites.
####Please implement the Konami Code in JavaScript.
To test your code, we will open a console window onto a Web page, copy your code, paste it into the console, and hit Enter. When the Konami code is successfully entered, your code should do this:
console.log('Konami!');
####Your Code Should Be:
Robust. We'll test by trying out correct and incorrect strings of keypresses on current versions of Chrome, Edge, Firefox, Internet Explorer, Konqueror, Safari, and Opera.
Invisible. Your code should not be easily detectable by other scripts running on the same page. Among other things, don't alter the DOM, steal global event listeners, or make any network requests after loading.
Independent. Don't include or require any libraries, as they a) require network requests and b) tend not to be invisible once running.
Readable. Other engineers should be able to look at your code and understand it.
Maintainable. If we decide we need to change the Konami code into another string of characters, we should be able to do so easily.
####Resources:
Please use any Internet resource you find useful. Stack Overflow, the Mozilla Developer Network, and Quirksmode are some of our favorites.