Thank you for such awesome feedback! I will definitely take all this into account. I really appreciate it. I might be hittin you up for more code reviews.
I started learning about 10 days ago. I'm taking courses on Udemy and got a couple books too. And been reading things on javascript.info (they have some nice documentation). Do you know any good Javascript courses or resources for beginners?
Hey that's pretty cool! Here's my feedback on the code:
Make the prompt a
constvariable instead oflet.Please, don't use
varanymore, you seem to knowletandconstdo exist ;)Your prompt is prone to XSS, try to find a different solution for inserting content in the DOM
Don't use
else ifstatements, they add unesseccary code, anifstatement is good enough (bail out early)(My opinion) use arrow functions instead of regular ones, ex:
const foo = (a, b) => a + b;(Also my opinion) use
document.querySelector('.classEl #idEl');How long have you been using JavaScript? It looks amazing if you're just starting out!
Thank you for such awesome feedback! I will definitely take all this into account. I really appreciate it. I might be hittin you up for more code reviews.
I started learning about 10 days ago. I'm taking courses on Udemy and got a couple books too. And been reading things on javascript.info (they have some nice documentation). Do you know any good Javascript courses or resources for beginners?
Thank you again!
10 days ago? This is some solid code! I'd recommend looking at Traversy Media, Google Chrome Developers, Andre Madarang and Fireship. Once you get more advanced you'll feel home in documentation sites like Mozilla