Skip to content

Instantly share code, notes, and snippets.

@codecakes
Created April 28, 2016 08:12
Show Gist options
  • Save codecakes/a3d091f9639c8d7b4e81d686580070ea to your computer and use it in GitHub Desktop.
Save codecakes/a3d091f9639c8d7b4e81d686580070ea to your computer and use it in GitHub Desktop.
Write a program that listens for a keyup event. In the handler, check which key was released. If it was “Y”, log the word “Yes”. If it was “N” log the word “No”. If it was any other key, log, “I don’t understand.”
<html>
<head>
</head>
<body>
<script async src="//jsfiddle.net/3M6Xt/31/embed/js,html,css,result/dark/"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment