** A method provided in Ruby that outputs a value to a terminal. ** ** If you write a value after puts, that value will be output to the terminal.
[Example] puts method
name = "Taro"
#Output to terminal
puts name
[Example] Terminal
#The value of name is output
=> "Taro"
Now let's actually write the code. Edit the ruby file as follows.
ruby file
input = "Hello"
puts "The value you entered is#{input}is"
** The puts method is a method that outputs values to the terminal. ** **
Recommended Posts