Center method is not working

I have created a small program that uses center to put some asterisks around a string but I don't get any asterisks in the results.
Here is the code :

name1 = 'larry' name2 = 'curly' name3 = 'moe' health1 = 60 health2 = 125 health3 = 100 puts "#{name1.capitalize}'s health is #{health1}." puts "#{name2.upcase} has a health of #{health2}." stringVariable = "#{name3.capitalize} has a health of #{health3}." puts, '*')

And here is the console output :

Larry's health is 60.
CURLY has a health of 125.
Moe has a health of 100.

Process finished with exit code 0

1 comment
Comment actions Permalink

The problem has gone away!Maybe it was a typo, who knows!


Please sign in to leave a comment.