JSFiddle - React, Tailwind, and code Playground
by mohammadAdil
HTML
<textarea name='txtObjective' class='objectives'>this is some text</textarea>
<textarea name='txtObjective' class='objectives'>this is some more text</textarea>
<textarea name='txtObjective' class='objectives'>this is even some more text</textarea>
JavaScript
var textArray = [];
$('[name=txtObjective]').each(function (i) {
//alert($(this).val());
textArray.push($(this).val());
});