RIP Tutorial
  • Tags
  • Topics
  • Examples
  • eBooks
Download Ruby Language (PDF)

Ruby Language

  • Getting started with Ruby Language
  • Awesome Book
  • Awesome Community
  • Awesome Course
  • Awesome Tutorial
  • Awesome YouTube
  • Arrays
    • #map
    • Accessing elements
    • Arrays and the splat (*) operator
    • Arrays union, intersection and difference
    • Cast to Array from any object
    • Create an Array of consecutive numbers or letters
    • Create Array of numbers
    • Create Array of Strings
    • Create Array of Symbols
    • Create Array with Array::new
    • Creating an Array with the literal constructor [ ]
    • Decomposition
    • Filtering arrays
    • Get all combinations / permutations of an array
    • Get unique array elements
    • Inject, reduce
    • Manipulating Array Elements
    • Remove all nil elements from an array with #compact
    • Turn multi-dimensional array into a one-dimensional (flattened) array
    • Two-dimensional array
  • Blocks and Procs and Lambdas
  • C Extensions
  • Casting (type conversion)
  • Catching Exceptions with Begin / Rescue
  • Classes
  • Command Line Apps
  • Comments
  • Comparable
  • Constants
  • Control Flow
  • DateTime
  • Debugging
  • Design Patterns and Idioms in Ruby
  • Destructuring
  • Dynamic Evaluation
  • Enumerable in Ruby
  • Enumerators
  • Environment Variables
  • ERB
  • Exceptions
  • File and I/O Operations
  • Gem Creation/Management
  • Gem Usage
  • Generate a random number
  • Getting started with Hanami
  • Hashes
  • Implicit Receivers and Understanding Self
  • Inheritance
  • Installation
  • instance_eval
  • Introspection
  • Introspection in Ruby
  • IRB
  • Iteration
  • JSON with Ruby
  • Keyword Arguments
  • Loading Source Files
  • Message Passing
  • Metaprogramming
  • method_missing
  • Methods
  • Modules
  • Monkey Patching in Ruby
  • Monkey Patching in Ruby
  • Monkey Patching in Ruby
  • Multidimensional Arrays
  • Numbers
  • Operating System or Shell commands
  • Operators
  • Operators
  • OptionParser
  • Pure RSpec JSON API testing
  • Queue
  • Range
  • rbenv
  • Recursion in Ruby
  • Refinements
  • Regular Expressions and Regex Based Operations
  • Ruby Access Modifiers
  • Ruby Version Manager
  • Singleton Class
  • Special Constants in Ruby
  • Splat operator (*)
  • Strings
  • Struct
  • Symbols
  • Thread
  • Time
  • Truthiness
  • Variable Scope and Visibility


Ruby Language

  • Getting started with Ruby Language
  • Awesome Book
  • Awesome Community
  • Awesome Course
  • Awesome Tutorial
  • Awesome YouTube
  • Arrays
    • #map
    • Accessing elements
    • Arrays and the splat (*) operator
    • Arrays union, intersection and difference
    • Cast to Array from any object
    • Create an Array of consecutive numbers or letters
    • Create Array of numbers
    • Create Array of Strings
    • Create Array of Symbols
    • Create Array with Array::new
    • Creating an Array with the literal constructor [ ]
    • Decomposition
    • Filtering arrays
    • Get all combinations / permutations of an array
    • Get unique array elements
    • Inject, reduce
    • Manipulating Array Elements
    • Remove all nil elements from an array with #compact
    • Turn multi-dimensional array into a one-dimensional (flattened) array
    • Two-dimensional array
  • Blocks and Procs and Lambdas
  • C Extensions
  • Casting (type conversion)
  • Catching Exceptions with Begin / Rescue
  • Classes
  • Command Line Apps
  • Comments
  • Comparable
  • Constants
  • Control Flow
  • DateTime
  • Debugging
  • Design Patterns and Idioms in Ruby
  • Destructuring
  • Dynamic Evaluation
  • Enumerable in Ruby
  • Enumerators
  • Environment Variables
  • ERB
  • Exceptions
  • File and I/O Operations
  • Gem Creation/Management
  • Gem Usage
  • Generate a random number
  • Getting started with Hanami
  • Hashes
  • Implicit Receivers and Understanding Self
  • Inheritance
  • Installation
  • instance_eval
  • Introspection
  • Introspection in Ruby
  • IRB
  • Iteration
  • JSON with Ruby
  • Keyword Arguments
  • Loading Source Files
  • Message Passing
  • Metaprogramming
  • method_missing
  • Methods
  • Modules
  • Monkey Patching in Ruby
  • Monkey Patching in Ruby
  • Monkey Patching in Ruby
  • Multidimensional Arrays
  • Numbers
  • Operating System or Shell commands
  • Operators
  • Operators
  • OptionParser
  • Pure RSpec JSON API testing
  • Queue
  • Range
  • rbenv
  • Recursion in Ruby
  • Refinements
  • Regular Expressions and Regex Based Operations
  • Ruby Access Modifiers
  • Ruby Version Manager
  • Singleton Class
  • Special Constants in Ruby
  • Splat operator (*)
  • Strings
  • Struct
  • Symbols
  • Thread
  • Time
  • Truthiness
  • Variable Scope and Visibility

Ruby LanguageArrays


Syntax

  • a = [] # using array literal
  • a = Array.new # equivalent to using literal
  • a = Array.new(5) # create an array with 5 elements with value of nil.
  • a = Array.new(5, 0) # create an array with 5 elements with default value of 0.

Arrays Related Examples

  • #map
  • Accessing elements
  • Arrays and the splat (*) operator
  • Arrays union, intersection and difference
  • Cast to Array from any object
  • Create an Array of consecutive numbers or letters
  • Create Array of numbers
  • Create Array of Strings
  • Create Array of Symbols
  • Create Array with Array::new
  • Creating an Array with the literal constructor [ ]
  • Decomposition
  • Filtering arrays
  • Get all combinations / permutations of an array
  • Get unique array elements
  • Inject, reduce
  • Manipulating Array Elements
  • Remove all nil elements from an array with #compact
  • Turn multi-dimensional array into a one-dimensional (flattened) array
  • Two-dimensional array



PDF - Download Ruby Language for free


Previous Next
Related Tags
  • HTML
  • JavaScript
  • jQuery
  • MongoDB
  • MySQL
  • postgresql
  • Python Language
  • Regular Expressions
  • Ruby on Rails
  • SQL
This modified text is an extract of the original Stack Overflow Documentation created by following contributors and released under CC BY-SA 3.0
This website is not affiliated with Stack Overflow
Email: tutorialpedia@outlook.com