JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="ggg[]" class="ggg" readonly value="Первая строка"> 
<input type="text" name="ggg[]" class="ggg" readonly value="Вторая строка"> 
<input type="text" name="ggg[]" class="ggg" readonly value="Третья строка"> 
<p>
<span class="fav-c-z"></span>
</p>

JavaScript

$('.fav-c-z').text($('.ggg').val());