0
$('li') in jQuery
$('li') in jQuery return something like [.........]. Is it an array ?
1 Réponse
+ 6
It returns an array of elements which are not jquery objects.
If someone is wondering how jquery managed to add custom functions to the array for example:
$("li").hide()
The functions are assigned to __proto__ property
var array = document.getElementsByTagName("li")
array.__proto__.hide = function() {
for(let a = 0; a < this.length; a++) {
this[a].style.display = "none"
}
}
array.hide()