Please don't use w3schools. Its information is unreliable at best. The closest thing out there to a user's manual for the modern web is
https://developer.mozilla.org
It's possibly the only reference you need for browser compatible JavaScript.
It's possibly the only reference you need for browser compatible JavaScript.
I don't think w3schools is "unreliable" per se. I don't use for learning as much as a reference though and move on fast if I don't like what I find there.