mdn / beginner-html-site-scripted

A single-page website created to help complete beginners learn HTML with JS added to help beginners learn JavaScript. Supports https://developer.mozilla.org/en-US/Learn/Getting_started_with_the_web/JavaScript_basics
https://mdn.github.io/beginner-html-site-scripted/
Creative Commons Zero v1.0 Universal
262 stars 296 forks source link

wouldn't if(!myName) cover myName === null. #14

Closed siraj-samsudeen closed 4 years ago

siraj-samsudeen commented 4 years ago

I tested it in Google Chrome with only the first part of "if(!myName || myName === null)" and it works when I cancel the prompt and when I press Ok without entering anything.

chrisdavidmills commented 4 years ago

Yeah, I think you're right here — I can't remember why I wrote it like this ;-)

chrisdavidmills commented 4 years ago

Thanks for the contribution.

siraj-samsudeen commented 4 years ago

Thanks a lot Chris. I am new to JS and to MDN. I loved the Django tutorial on MDN and hence decided to do everything in MDN from scratch. I am so glad to make my first contribution with my little knowledge of JS.

chrisdavidmills commented 4 years ago

I am so glad to make my first contribution with my little knowledge of JS.

That's great, I am so pleased for you.

I am glad you enjoyed the Django tutorial too!