Merge pull request #1 from enderkus/master
puts usage examples and string interpolation
This commit is contained in:
commit
c3bb183571
|
@ -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
10
string_interpolation.rb
Normal 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}.
|
Loading…
Reference in New Issue
Block a user