Question d’entretien chez 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

Réponse à la question d'entretien

Utilisateur anonyme

29 août 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; });