if (x = 1)
if var x = 1
if let x = 1 //let is const in C
var x = 1
var x: Int = 1
In swift you can doCode: [Select]if var x = 1I guess declaring a variable in the condition would be an automatic true?
if( int x = 1 )
Oh btw, the datatype on variables are assumed
Code: [Select]if( int x = 1 )Dunno about swift, however, C++ will return false if 0 was assigned.