Category: PHP, javascript

A blog on PHP, JavaScript and more Amit Merchant · July 24, 2020 · ⋆ JavaScript The easter egg is nothing but a sequence of different keypress known as Konami Code (↑↑↓↓←→←→BA), which when achieved, can invoke this control panel at the bottom of the page.

I found this so cool and I was tempted to implement something like this on my blog as well.

For this, we’re splicing off the array from the reverse to the length of the Konami code with the following code like so.

All we need to do is convert both keySequence and konamiCode to string and compare both to invoke the easter egg like so.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners