Skip to content

Instantly share code, notes, and snippets.

@danhhuynh25029
Last active January 19, 2022 20:59
Show Gist options
  • Save danhhuynh25029/659fa039d9f5689192d06121e4934a45 to your computer and use it in GitHub Desktop.
Save danhhuynh25029/659fa039d9f5689192d06121e4934a45 to your computer and use it in GitHub Desktop.
@animal = ('cat','dog','cow');
# các phần tử trong animal được đánh số từ 0 -> 2
# Để lấy ra giá trị của chúng ta chỉ cần
print $animal[0] # cat nằm ở vị trí 0
print $animal[1] # cat nằm ở vị trí 1
print $animal[2] # cat nằm ở vị trí 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment