Как взять несколько входов в одном пропаде

const inputs = prompt("Enter your inputs separated by a tilde ~").split("~");

console.log(inputs);
Silly Stoat