typeOf()

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
acomagu
Posts: 6
Joined: 03 Jan 2015 10:47

typeOf()

Post by acomagu » 23 Feb 2015 13:32

Hi,

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

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: typeOf()

Post by TheBrain1984 » 02 Mar 2015 11:29

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).

Locked