7 Essential JavaScript Functions
Aaliyah Choudhry
182

Question where is a link to validate() as a built in JS function? There a number of validation related APIs from Web Forms 2 that are now in HTML5 such as checkValidity https://www.w3.org/TR/2014/REC-html5-20141028/forms.html but the function you describe certainly isn’t per spec though a person obviously might self-define one.

Also one small point that could be clarified, onload is not a function really in the sense you invoke it directly as implied by the way it is written. Obviously it is super important. Probably should be grouped into an article about events. Also I think you talk about onload you really need to at least hint at the whole discussion about waiting or not for full page load thus the idea of looking at DOMContentLoaded ( https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded ) as opposed to waiting for onload which is what most libraries that wrap the load event do some variation on.

Anyway thank you for putting out your articles for people, I think many developers should be reminded of core features they can rely on in Vanilla JS.