How to use string valueof()?

Hello guys! I would like to figure out the length of a number, for example: 412 includes 3 digits, but first I have to convert it to a string. I googled that function but it’s been tricky to get the result. All I want to is getting the lenght of an string. Could you please help me with that?

For example.
var contact={leo:412}
I would like to know how many digits leo has.

Something like this?

1 Like

That’s exactly what I was looking for! Many thanks man! I just started learning how to code a few weeks ago and I fell in love! Regards!