Cometí un error 😭

Published by MegaLoser in

Un archivo JSON contiene arreglos anidados a profundidades arbitrarias. Devuelve la cadena que se encuentre en cualquier parte de ellos. Si no hay ninguna cadena, devuelve "What... why did you make this?".

Ejemplos

getValue([[[[["Bazinga"]]]]]) ➞ "Bazinga"

getValue([[], [[[[["God what is happening..."]]]]]]) ➞ "God what is happening..."

getValue([[[[[[]]]]]]) ➞ "What... why did you make this?"

getValue([[[[[[]]]], "I'm not gonna lose."]]) ➞ "I'm not gonna lose."

Notas

La cadena puede aparecer a cualquier profundidad de anidamiento.