If-else expression in boolean
(cond && a) || (!cond && b)
It is basically a way to implement a Mux gate.
Written by Weera Wu
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#