I´ve got a text field where users can type names (one by line). I´d like to get these values and put them in a array. The arrays starts off at empty. E.g list = [];
I tried to use the .push() and .join() methods
<div class="form">
<label for="nomes">Insira um nome por linha</label><br>
<textarea id="nomes"></textarea>
</div>
<button id="sortear">Sortear</button>
function SorteioApp() {
var lista = [];
var entradaDados = document.querySelector('#nomes').value;
lista.push(entradaDados);
}