JSFiddle - React, Tailwind, and code Playground
JavaScript
$(function(){
function arrLen(arr) {
var count = 0;
$.each(arr, function() {
count = count + 1;
});
return count;
}
var a = ["a", "b", "c", "d"];
var lengthOfA = arrLen(a);
$('body').html(lengthOfA)
})