Posted on 21st July 2024|17 views
Does Go have a ternary operator?
Posted on 21st July 2024| views
There is no ternary operator in Go but you can get the equivalent results by using if/else
if exp
{ x = trueVale }
else
{ x = falseVale }