Created
April 22, 2020 14:53
-
-
Save wicky-andrian/23ddb90214314b8dc352e6cd9e12ffdc to your computer and use it in GitHub Desktop.
Metode string part 5
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 = "Java Ruby PHP Python HTML" | |
puts a | |
puts "metode slice: #{a.slice(0..3)}" | |
puts "Objek ID: #{a.object_id}" | |
puts "#{a} \n" | |
puts "metode slice! #{a.slice!(0..3)}" | |
puts "Objek ID: #{a.object_id}" | |
puts a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment