Answers for "$each in function"

11

for each jquery

$('.testimonial').each(function(){
    //if statement here 
    // use $(this) to reference the current div in the loop
    //you can try something like...
    if(condition){
    }
 });
Posted by: Guest on March-11-2020
0

for each functions javascript

//Am goinmg to practice the next big thing, using for.each function yo tripple iontegers in an array :)
  //for.each function is used to run a command on each number or string in an array 
  const theFigures = [2,4,5,6,7,8,9,12,23,45,68,31,90];
  const afterMath = (num) => {
    const theArray = [];
    num.forEach((n) => {
      const trippled = n*3;
      theArray.push(trippled);
    });
    return theArray;
  }
  console.log(afterMath(theFigures));
Posted by: Guest on September-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language