JSFiddle - React, Tailwind, and code Playground

by Daniel Lamb

JavaScript

// jQuery 
// arrange
var list = ['one', 'two', 'three', 'four', 'five'],
    obj = {six:6, seven:7, eight:8, nine: 9, ten: 10},
    count = 0;

// act
$.each(list, function (index, value) {    
    count++;
});
$.each(obj, function (index, value) {    
    count++;
});

// assert: should log true
console.log(count === 10);