Hey everyone. I followed an online tutorial for creating a simple music maker in javascript. The problem is, I can’t figure out why mine isn’t working. The HTML and CSS work just fine, but the JS just won’t run. I keep getting undefined errors, but the guy in the tutorial never did.
Here is my code.
Please tell me if you see anything wrong with it.
Without seeing all of the code it will be hard to help. Put the full code online, you can make a Codepen or put it on GitHub.
Normally I would say it’s just the forum, but in some places, you do have the correct quotes so I’m not sure. You should use double " or single ' quotes.
Pretty sure the animation property value has to be a string.
bubble.style.animation = "jump 1s ease";
Here is your code formatted and with the quotes and animation property fixed:
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.