var value = 10/2;
I want to take length of the variable value. How to take it?

Member Avatar

As in number of characters?

10/2 = 1 (5), 10/4 = 3 (2.5). Fun with 10/3

value.toString().length;

As per above code, We first have to convert our integer value to string for find it's length.