Soletrando

Published by Helen Yu in

Crie uma função que receba uma palavra e a soletre, adicionando letras consecutivamente até completar a palavra.

Exemplos

spelling("bee") ➞ ["b", "be", "bee"]

spelling("happy") ➞ ["h", "ha", "hap", "happ", "happy"]

spelling("eagerly") ➞ ["e", "ea", "eag", "eage", "eager", "eagerl", "eagerly"]

Notas

N/A