Created
April 23, 2020 16:37
-
-
Save wicky-andrian/34a89c6c1af8ad9b69d9c6068d42f338 to your computer and use it in GitHub Desktop.
Contoh metode string part 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = "234" | |
puts "a = 234" | |
puts "Contoh pakai to_i: #{a.to_i}" | |
b = "1234.5667" | |
puts "b = 1234.5667" | |
puts "Contoh b ada angka di belakangan: #{b.to_i}" | |
c = "abc" | |
puts "c = abc" | |
puts "Contoh c pakai to_i: #{c.to_i}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment