-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand on foundational JS docs #4057
Conversation
this is great @stalgiag and thanks @singhvisha for the work on this too! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great. a few notes inline.
one other thought -- I think it would be good to include console.log
. we can mention it's equivalent (basically) to print()
. especially if some of these examples make use of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few things i've noticed.
@singhvisha and @stalgiag this is great! |
Thank you @limzykenneth , @lmccart , and @brysonian ! I think I covered all of the requests. I still need to do wording and clarity passes but this is starting to feel good. |
I added the comparison operators as per @brysonian 's suggestion. The tests above will fail because the linter doesn't like the example with the double If you do So the few remaining questions:
|
does == need to be in there? If the only place it appears in the samples is here then maybe it isn't necessary. There are so few instances where one would use it anyway. |
I think it's important to include |
Yeah similar to what @limzykenneth is saying, I thought it useful to have That said, I wonder if perhaps |
Yeah, I think just some mention of |
@stalgiag as a cheap hack, if you write it as |
@lmccart this relates to a problem we encountered with the first pass on the docs. Basically a dot can't go in any of the fields. But in good news, I just figured out that I can add the |
Okay, this feels ready for final review and then merging. Those other references ( |
🎉 thanks @stalgiag and everyone else, this is fantastic! |
This PR builds on the great work by @singhvisha .
I wanted to try my hand at adding some additional beginner-friendly language to describe some of the key JS basics and supplement the linked MDN pages. This requires trying to figure out how much information to give and how much to withhold.
As expected, this is a really difficult needle to thread.
So any and all help with making the descriptions more clear and concise is welcome.
In addition, any higher-level edit suggestions are welcome. This can be anything from formatting to a suggestion to omit or include a specific reference.
Also, I have a couple more specific areas that I welcome opinions on:
for-in
andfor-of
references. I am finding it difficult to explain the distinction between them in beginner-friendly language. I also feel that these two are a little on-the-edge of my imagined boundaries for these docs.parseInt()
. We haveint()
in the library.setup()
etc. But it means a ton of instances ofconsole.log
. (which might be better anyways sinceprint()
is contested)types
even though this is a murky area with JS. I think it is useful for beginners to feel comfortable with these terms. It also helps with cross-referencing when describing what other things are for. (ie classes referencing objects)I think it is important to nail down the scope of the references and language used within them. So this means I will probably keep passing over these for a bit till they are solid.
Any and all input is welcome, especially from people that have experience teaching these concepts.
Gonna no-pressure tag a few people
@shubymao @singhvisha @lmccart @outofambit @brysonian
closes #3897