An object-oriented scripting language developed by Yukihiro Matsumoto. A programming language for building a "system" for web applications.
Similar languages: PHP, Python
>_console
Hello seal
・ Console: Input / output device
puts "Hello seal"
-Instruction "Print the value after puts"
・ Do not enclose numbers in quotation marks ・ Character strings and numbers are separate
5 + 2 =7 ← (Numerical value)
"5 + 2" ← (String)
● Addition(+) ● subtraction(-) ● multiplication(/) ● division(%)
puts "Seal" + "That's right"
>_console
It's a seal
⇒ If you use the + symbol between character strings, Character strings can be concatenated.
puts 3 + 5 → 8 (Numerical value)
puts "3"+"5" →35 (String)
Recommended Posts