JSFiddle - React, Tailwind, and code Playground

by Daniel Lamb

JavaScript

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

// act
angular.forEach(list, function (value, key) {    
    count++;
});
angular.forEach(obj, function (value, key) {    
    count++;
});

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