JSFiddle - React, Tailwind, and code Playground

by korchev

JavaScript

var result = $([1,2,3,4]).filter(function() {
    return this > 1;
}).map(function() {
    return this * this;
});

console.log(result)