DEV Community

loading...

Discussion on: Daily Challenge #46 - ???

Collapse
hanachin profile image
Seiei Miyagi

I love weird Ruby syntax😆

TIPS: ?? is known as character literal notation
docs.ruby-lang.org/en/trunk/syntax...

Thread Thread
citizen428 profile image
Michael Kohl

I know, that's why I wrote "especially with the character literal" ;-)

Other literals many people don't know are rational numbers (4/3r) and complex numbers (3+2i).

Thread Thread
hanachin profile image
Seiei Miyagi • Edited

I see. Also % literal is my favorite string literal :)

s = %
here is string, the delimiter is \\n

puts s