A reference to function is being stored in observerNode[selector] and pop is being used to get that reference and store into cb (callback) hence when you call cb it actually calls that function. And yes it is a very valid syntax in JavaScript.
I have only tested it fir Vanilla JS
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A reference to function is being stored in observerNode[selector] and
pop
is being used to get that reference and store intocb
(callback) hence when you callcb
it actually calls that function. And yes it is a very valid syntax in JavaScript.I have only tested it fir Vanilla JS