รูบี้ได้ทุก nth ธาตุ

รหัสตัวอย่าง

0
0

รูบี้ nth ธาตุของอาเรย์

# Ruby program to demonstrate the  
# accessing the elements of the array 
    
# creating string using [] 
str = ["GFG", "G4G", "Sudo", "Geeks"] 
    
# accessing array elements 
# using index 
puts str[1] 
    
# using the negative index 
puts str[-1]

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................