https://github.com/andrewjbateman/javascript-codepattern-function
:clipboard: Uses javascript to detect a sequence of keys. A function is run to show a unicorn if the sequence is detected. From Wes Bos Javascript30 tutorial 12.
https://github.com/andrewjbateman/javascript-codepattern-function
css html javascript javascript30
Last synced: 5 months ago
JSON representation
:clipboard: Uses javascript to detect a sequence of keys. A function is run to show a unicorn if the sequence is detected. From Wes Bos Javascript30 tutorial 12.
- Host: GitHub
- URL: https://github.com/andrewjbateman/javascript-codepattern-function
- Owner: AndrewJBateman
- Created: 2018-12-03T06:34:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-08T20:47:35.000Z (over 5 years ago)
- Last Synced: 2024-12-27T02:45:01.081Z (about 1 year ago)
- Topics: css, html, javascript, javascript30
- Language: JavaScript
- Homepage:
- Size: 340 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :zap: Javascript30 Tutorial Codepattern Function
* Wes Bos Youtube Tutorial: [JavaScript KONAMI CODE! #JavaScript30 12/30](https://www.youtube.com/watch?v=_A5eVOIqGLU).
*** Note: to open web links in a new window use: _ctrl+click on link_**
## :page_facing_up: Table of contents
* [General info](#general-info)
* [Screenshots](#screenshots)
* [Technologies](#technologies)
* [Setup](#setup)
* [Features](#features)
* [Status](#status)
* [Inspiration](#inspiration)
* [Contact](#contact)
## :books: General info
* Uses javascript to detect a sequence of keys. A function is run to show a unicorn if the sequence is detected.
## :camera: Screenshots
.
## :signal_strength: Technologies
* [Javascript v1.9 ECMA-262 ECMAScript 2018](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
## :floppy_disk: Setup
* Open index.html in browser. If any code is changed the browser needs to be refreshed.
## :computer: Code Examples
* Code to check a sequence of keys is the same as a defined string constant.
```javascript
// join letters to make a string then check if it is the same as the secret code
if (pressed.join('').includes(secretCode)) {
console.log('Ding Dong!');
cornify_add();
}
```
## :cool: Features
* A unicorn is shown if the sequence is typed correctly.
## :clipboard: Status & To-Do List
* Status: Working. Updated to work from browser, not from Glitch.
* To-Do: Nothing. Could use a response header to avoid the warning from the unicorn site but not urgent.
## :clap: Inspiration
* Wes Bos Youtube Tutorial: [JavaScript KONAMI CODE! #JavaScript30 12/30](https://www.youtube.com/watch?v=_A5eVOIqGLU)
## :envelope: Contact
* Repo created by [ABateman](https://www.andrewbateman.org) - you are welcome to [send me a message](https://andrewbateman.org/contact)