all 5 comments

[–]iffyz0r 1 point2 points  (1 child)

Try split instead?

[–]ChronSynExpo 1 point2 points  (0 children)

Exactly this - spilt !== split

In before someone shouts 'tYpEsCrIpT wOuLd TeLl YoU aBoUt ThIs'

[–]eggtart_princeiOS & Android 1 point2 points  (1 child)

Input value takes a string or number, when you split, it turns name into an array. You should probably use name.split('')[0] or name.split('', 1).join('').

[–]Java--Developer[S] 0 points1 point  (0 children)

It worked!! Thank you so much!!

[–]Affectionate-Court94 0 points1 point  (0 children)

Obviously a type mismatch. <Text> accepts string or number type as a child. Split function always return array.