JSFiddle - React, Tailwind, and code Playground

by skram

JavaScript

var numOfTrue = 0;
var Answers = [ "true", "false", "false", "true", "false" ];

alert(Answers.toString().match(/true/g).length);