Message from JavaScript discussions

September 2018

— Ive had some discussion recently..


Some time ago I read an article about jsperf not being a reliable way to compare/check js performance.

When I find ill post it here.

— Ye, okay, will be good

— Why is getElementsByClassName more performant than querySelectorAll according to jsperf. Isnt it supposed to be the other way around?

Message permanent page

— determin1st

— I dont know, maybe it's a wrapper for querySelectorAll. depends on how browser-makers implemented it.

Message permanent page

— It doesnt matter if you dont do any engine or lib..

— A node list is static a htmlcollection is live. I'm pretty sure querySelector should be faster

— What is callback. Fonction ??

— A callback is a function you pass as a parameter to another function which will call your callback function after it's done

Message permanent page

— Or after some condition

— But why do that ?