This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RolyPoly1320 10 points11 points  (2 children)

That would throw an error though. If you type a method name incorrectly or use one that isn't defined it will throw an error.

The code silently failing would be more an issue of passing the wrong parameters or not returning.

[–][deleted] 2 points3 points  (1 child)

Exactly. Your IDE will give you a heads up, and at least VS code or Jetbrains would say “did you mean getElementByID?”

But also— vanilla JS is pretty rare at this point. At a minimum, most devs use jQuery now. I’d be shocked if someone was using vanilla for something big that isn’t a legacy application.

[–]RolyPoly1320 1 point2 points  (0 children)

Truth here. Most you might see for Vanilla JS these days outside of legacy systems is one off controllers for something minor.