In the lesson titled Nullish coalescing operator '??', in the Comparison with II section, located here, there is a minor mistake in the grammar.
"Historically, the OR || operator was there first. It exists since the beginning of JavaScript, so developers were using it for such purposes for a long time."
Should become something like
"Historically, the OR || operator was there first. It's existed since the beginning of JavaScript, so developers were using it for such purposes for a long time."
or
"Historically, the OR || operator was there first. It's been there since the beginning of JavaScript, so developers were using it for such purposes for a long time."
Thank you for these excellent lessons. This is my first attempt to contribute something to a project via Github, I hope it's formatted properly.
dark over dark icon in dark mode
Hello,
I´m interested in becoming a maintainer for a translation to Portuguese, at https://javascript.info.
GitHub Nick = Leopoldo V Fonseca
(https://github.com/leopoldovcfonseca)
Thanks for creating this wonderful tutorial. I've enjoyed it so far and I continue to learn about JS.
Who are you?
What are you trying to do?
What did you spot?
Reference material (note to self): https://www.plainlanguage.gov/resources/checklists/web-checklist/
Question from me (solved below)
Before I put more effort into this, I want to know if this project is actively maintained. I see lots of old PRs and issues, so I'm not sure if it's worth my time to suggest edits.
Ideas for the future
Perhaps a style guide needs creating in future, I see conflicting things like 'we' vs 'you'. Sometimes 'such that' is used, sometimes it's not. I also noticed there is no specific contribution guide (what to do and what not to do).
UPDATE: I found AUTHORING.md which fits this purpose.
Some programming languages allow to use negative indexes for the same purpose, like fruits[-1].
should be:
Some programming languages allow "us" to use negative indexes for the same purpose, like fruits[-1].
Hey! I'd like to point out that the "Get coordinates using button.getBoundingClientRect() for this button" button is making this page have a horizontal sidebar on mobile devices.
This isn't ideal since this is the only element that overflows the maximum width of mobile devices display.
What I'd suggest is resizing this button for mobile users, such that the button would fit the page. This can be achieved through CSS, setting up a maximum width of the button on mobile screens, the text will overflow to the next line.
Cya
Hi,
I just found a bug on the main page (i checked it on brave and chrome, opera), it turns out that the top bar displaying the user's position on the page does not cover all the text underneath and you can see some text on top of it. I don't know what causes it, because top property is set to 0.
Gif:
I know how to fix this issue, just set the value of the "top" property of the "tabs__menu sticky" element to -0.1px to avoid the problem.
Gif:
Regarding 1-js/09-classes/06-instanceof, now Edge/Chrome browsers don't like this syntax anymore, and throws Uncaught SyntaxError: Unexpected token '.'
Now we have to write ({}).toString()
. In Node.js {}.toString()
still works. Was there a change in the spec recently or it's actually a bug in brower?
Current: Modern build tools, such as webpack and others, bundle modules together and optimize them to speedup loading. They also removed unused imports.
Expected: Modern build tools, such as webpack and others, bundle modules together and optimize them to speedup loading. They also remove unused imports.
Current: For instance, if you import * as library from a huge code library, and then use only few methods, then unused ones will not be included into the optimzed bundle.
Expected: For instance, if you import * as library from a huge code library, and then use only few methods, then unused ones will not be included into the optimized bundle.
Language Code: tl
For maintainer, I'm only one, but I will try to get some help from other Filipino programmers and developers. Another problem is that I'm a student and new to learning JavaScript. Is it okay?
GitHub Username: diamant3
Email: diamant3@zohomail.com
If I execute the Function in if exercise I get Hello, John
, and that was the solution I expected as well.
However, in your solution I read:
The result is an error.
The functionsayHi
is declared inside theif
, so it only lives inside it. There is nosayHi
outside.
Your solution is wrong, please fix it.
Ilya,
I would appreciate it if you could explain how to call, from a browser, JS functions with several parameters, in such a way that we can also capture the event object.
Thank you for your trouble, and best regards,
Eric
Hello!
Not sure if requests fit here, but would it possible to expand the explanations to explain what CSRF cookies are and how they work? There is an explanation on CORS so I would propose to have it next to one another.
I found this repo contains lots of JavaScript articles write in markdown format. Could we use some static generators like gatsby, hexo, vuepress listed in https://jamstack.org/generators/ to build static htmls and use them locally?
Part 3 (Additional articles)
Chapter 7 (Regular expressions)
Article 14 (Lookahead and lookbehind)
Why you don't mention that in JS non fixed length regexps (including quantifiers, backreferences etc.) are not allowed inside lookbehind expression ?
First you talk about lookahead, and using regexp with quantifier as lookahead condition in your example.
Copied from www.javascript.info
For example, \d+(?=\s)
(?=.*30)
looks for \d+
that is followed by a space (?=\s)
, and there’s 30
somewhere after it (?=.\*30)
Right after this you briefly talk about lookbehind and say it is the same thing but looks behind, without mentioning that it actually cannot do the same thing with non fixed lenght regular expressions (including quantifiers like *).
The first task of the variables page suggest to declare and use two variables :
admin
and name
.
Using name
as the name of the variable can be confusing and code editors will show a warning: 'name' is deprecated.ts(6385)
lib.dom.d.ts(17693, 5): The declaration was marked as deprecated here. (VSCode)
name
variable should be renamed
Would suggest to change the following sentence Arrays in accordance with Deque Complexity.
For instance, the MDN doc on arrays Array MDN doesn't mention that js arrays are deques.
There's a note on Private and protected properties and methods stating that the private keyword in classes isn't supported by any javascript engines and that usage requires polyfilling. But according to caniuse, the private keyword has been supported by all major browsers for almost 3 years.