1
I need to Break a String(Phrase) in the proper whitespace, so that it is inserted in place of the line breaking \n escape character, in order for it to skip line-by-line. See an example logic, below:
Casa Bonita
Stay like this:
House
Beautiful
For more details, see what I have achieved so far, but I wish to do something more...
<script>
window.onload=function(){
campo = "Casa Bonita"
letra = campo.split(" "); // Quebra Linha no Espaço
for(var i in letra)
alert(letra[i]);
}
</script>
Well, what is this something else.. /result being displayed on alert row after row successively according to the size of the String(Phrase).
However, I would like to skip each line using the \n and not <br> within a innerHTML();. Has help!
Nice, but there’s a way to adjust the method
sort();in order to list words in albetic order. If possible, exemplify how you would.– user43817