Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Ternary If/Else single line statement
kremisoski
Feb 3rd, 2015
345
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Ruby
0.14 KB
| None
|
0
0
raw
download
clone
embed
print
report
# if/else ternary one line no end required
#boolean ? "if statement" : "else statement"
3
>
4
?
"this can't be true"
:
"why would it be?"
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
1 hour ago | 5.32 KB
Untitled
1 hour ago | 17.84 KB
Untitled
3 hours ago | 14.09 KB
Untitled
5 hours ago | 14.94 KB
Untitled
6 hours ago | 5.83 KB
Untitled
7 hours ago | 9.82 KB
Untitled
9 hours ago | 12.23 KB
Untitled
11 hours ago | 14.35 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!