Page 1 of 1

typeOf()

Posted: 23 Feb 2015 13:32
by acomagu
Hi,

I want to know if the value is 2 or '2'.

Re: typeOf()

Posted: 02 Mar 2015 11:29
by TheBrain1984
Both.

For example if you make an expression after the action that gives you the value of 2 / '2' you can make

Code: Select all

value == '2' 
or

Code: Select all

value == 2 
both will be true. Most of the string-operations you can do also works on numbers. The only difference i know at the moment is the "+"-operator. For numbers it makes a sum of the two numbers for strings it concats the two strings (if the strings are not numbers).