logo-MindMajix
PostGoLangGoLang
A
Altaf syed

Posted on 16th June 2024|17 views

0
votes

Golang Ternary Operator

Does Go have a ternary operator?

1 answers
Answers
P
rushi chowdary

Posted on 16th June 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 }

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number