JSFiddle - React, Tailwind, and code Playground
by Cody Lindley
HTML
<script src="https://dl.dropboxusercontent.com/u/2026291/firebug-lite-debug.js"></script>
JavaScript
var isAboveTen = function (element, index, array) { //show all arguments passed
return element >= 10;
};
array1 = [1, 3, 43, 4, 121, 9, 314, 31];
//Filter out numbers that are equal or above 10, create new array
console.log(array1.filter(isAboveTen)); //logs [43, 121, 314, 31]