Skip to content

Instantly share code, notes, and snippets.

@wdiasvargas
Created Apr 24, 2018
Embed
What would you like to do?
var feira = "Fui no mercado comprar: caqui, limao, pera, morango, abacaxi.";
var comeco = feira.indexOf(':');
var final = feira.indexOf('.', comeco+1);
var lista = feira.substring(comeco+1, final);
console.log(lista)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment