2018年10月2日火曜日

#100DaysOfCode Day42

Day 42: October 2, 2018

Today's Progress:

  • freeCodeCamp's Drum Machine project
    • Made each key play a different sound
    • Made it show a different text on each key press

Thoughts:
I'm copy&pasting almost the same codes 9 times... for each key. There must be a smarter way to do it.
It also plays the sound on click, but it does not update the text. I'm now writing the onclick event as an attribute in an HTML tag. I think I need to do it in React.

Link to work:
CodePen
GitHub: sidemt/drum-machine

0 件のコメント:

コメントを投稿