在Ruby Koans中,您必須填寫下面代表string[1]
的空白。爲什麼答案是97?爲什麼這個字符串值是一個數字?
def test_you_can_get_a_single_character_from_a_string
string = "Bacon, lettuce and tomato"
assert_equal ___ , string[1]
end
在Ruby Koans中,您必須填寫下面代表string[1]
的空白。爲什麼答案是97?爲什麼這個字符串值是一個數字?
def test_you_can_get_a_single_character_from_a_string
string = "Bacon, lettuce and tomato"
assert_equal ___ , string[1]
end
你從哪裏得到koan?該公司在[三月]發生了變化(https://github.com/edgecase/ruby_koans/commit/a46642e192844a312c344d43147a81ecf43f438b)。 –
你期待着答案是什麼? –
安德魯,http://koans.heroku.com – Simpleton