---
title: "Discussion on \"Ruby Fundamentals: Arrays\" | Hashnode"
description: "Discussion on \"Ruby Fundamentals: Arrays\". In Ruby, to access elements, bracket notation is used with the index of the element.\nfruits = [\"banana\", \"mango\", \"pineapple\"] \nfruits[0]\n# => \"banana\"\nfruits[1]\n# => \"mango\"\nBracket notation can be used to update the elements as well. For example;\nf..."
url: "https://hashnode.com/posts/ruby-fundamentals-arrays/63034eda8cb53b2c16267b93"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Ruby Fundamentals: Arrays](https://muhambiphares.hashnode.dev/ruby-fundamentals-arrays?utm_source=hashnode&utm_medium=feed)

In Ruby, to access elements, bracket notation is used with the index of the element. fruits = \["banana", "mango", "pineapple"\] fruits\[0\] # => "banana" fruits\[1\] # => "mango" Bracket notation can be used to update the elements as well. For example; f...

Aug 22, 2022 · 2 min read · muhambiphares.hashnode.dev  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#array](https://hashnode.com/tag/array)

## Written by

[phares muhambi](https://hashnode.com/@muhambi716)

@muhambi716

  
[View profile](https://hashnode.com/@muhambi716)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
