Job offers
Companies
Tests
Blog
I'm an employer
Sign up
Log in
Group 2@2x
Created with Sketch.
Home
>
IT Tests
>
Questions
>
How to concatenate a string and an integer in Ruby
Question from the Ruby (legacy) test
How to concatenate a string and an integer in Ruby
Start test
See the Ruby (legacy) test
Easy
How to print «foo 42»?
str + i
'#{str} #{i}'
str + ' ' + i
"#{str} #{i}"
View the correction
Author: Olivier Milla
Status: Published
Question passed 18 times
Edit
0
Community Evaluations
No one has reviewed this question yet, be the first!
Similar Questions
More questions about Ruby
1
What is the output of the following Ruby code? `1..5.to_a`
0
How to add a method to a class in Ruby
0
How to declare a variable in Ruby
0
How to add a getter and setter method to a class in Ruby
0
Write a Ruby program that prints the first 100 prime numbers.
Load 5 more similar questions