<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
what does string[1…-1] do?
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
``` # method that capitalizes a word def capitalize(string) puts "#{string[0].upcase}#{string[1..-1]}" endcapitalize(“ryan”) # prints “Ryan”
capitalize(“jane”) # prints “Jane”
block that capitalizes each string in the array
[“ryan”, “jane”].each {|string| puts “#{string[0].upcase}#{string[1…-1]}”} # prints “Ryan”, then “Jane”
Replace this line with your code.