Domanda di colloquio di Fonality

How would you iterate through an array using JQuery. Find all elements with the class name "tip" using jQuery. Filter all even div elements using JQuery

Risposta di colloquio

Anonimo

29 ago 2016

1. var array = [1,2,3,4,5,6]; $.each(array, function(){ console.log(this); }); 2. var tips = $('.tip'); 3. var evenDivs = $('div').filter(function(index){ return index % 2 == 0; });