Techtonica / keyboard-shortcuts-practice

https://techtonica.github.io/keyboard-shortcuts-practice/
26 stars 56 forks source link

[refactor] Replace repetitive if blocks with lookup #102

Closed vegetabill closed 3 years ago

vegetabill commented 3 years ago

The long if statements in this function are very repetitive. Please come up with a better way with less duplication to have this functionality work, such as a lookup object or something else of your own choosing.

https://github.com/Techtonica/keyboard-shortcuts-practice/blob/1a642f3ce4a136ec3b325beec781f4ab97b18935/public/scripts/main.js#L143-L168

nadyafebi commented 3 years ago

Hi! I would love to work on this!

Shraddha2104 commented 3 years ago

Assigned!

vegetabill commented 3 years ago

@nadyafebi thanks for fixing this!