jshreyans / frontend-101

Front-end winter assignment for Department of Visual Media. These include tasks based on Vanilla JS and CSS.
0 stars 1 forks source link

B1 Review #12

Open jshreyans opened 5 years ago

jshreyans commented 5 years ago

Completed B1 Will be adding more animations on keydown and keyup to highlight what key has been pressed

sarthak-sehgal commented 5 years ago

@jshreyans551 have a look at the task description again "Clicking on these 'virtual keys' or pressing the corresponding keys on the keyboard should produce a sound (different sounds for different keys)."

jshreyans commented 5 years ago

@sarthak-sehgal I've added the necessary code for mouseclicks also. However, I had to use the switch-case again and that makes the code repetetive. I'm trying to make a function and simply call it in both mousedown and keydown but the switch receives different argument types in each event so that creates a problem.