If (... == ...) { ... }

if (street == “2”)
{car=this.test[3];}

is not working… how ist the syntax for that in ionic? thx

Debug the value of street or do a console log right before the check.
May be checking a number (street) against a string (“2”).

if (street == 2)
{car=this.test[3];}
try this

The advice in the previous post is pointless, due to the fact that JavaScript coerces strings to numbers when the other operand of the == operator is a number, but don’t take my word for it:

$ node
> 2 == "2";
true