Merge pull request #1 from enderkus/master

puts usage examples and string interpolation
This commit is contained in:
Mert Gör 🇹🇷 2024-05-02 13:04:48 +03:00 committed by GitHub
commit c3bb183571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -1,2 +1,7 @@
puts("hello Ruby!") puts("hello Ruby!")
puts(4-1) puts(4-1)
# Ruby programlama dilinde parantezleri kullanip kullanmamaniz bir sorun olusturmaz ustteki ciktilari asagidaki gibi de alabilirsiniz
puts "hello Ruby!"
puts 4-1

10
string_interpolation.rb Normal file
View File

@ -0,0 +1,10 @@
name = "Ruby"
release_date = 1992
puts "Hello #{name}" # => Hello Ruby
puts "The #{name} programming language was released in #{release_date}." # => The Ruby programming language was released in 1995.
# Dikkatli olun " (Cift tirnak) ile ' (Tek tirnak) farkli sonuclar cikarir.
puts 'The #{name} programming language was released in #{release_date}.' # => The #{name} programming language was released in #{release_date}.