mercredi 21 mars 2018

How to identify any string?

An array shows 3 numbers randomly, and I had to write a code that sums the 3 numbers, but the array has a trick to sometimes show a string: [96, ".!asd", 182] ["@#$%", 5, 43] [64, "bd", 48]

I would like to use an "if" that would return "not valid" if there's a string in the array. if (...){ return not valid } Please, if there's a way to identify any string, could you tell me the code?




Aucun commentaire:

Enregistrer un commentaire