DEV Community

Lateef Idris
Lateef Idris

Posted on

Ruby Intro

ruby is a programming language that allows us to make our web apps interactive

what I've learned so far about ruby's syntax is:
variable = "value"

variable can be a:
-"string"- any text
-boolean: true or false
-Integer: 0
-Float: 3.568
-array[]
-symbol:
-{#hash}

there are different types of loops, like .each and .loop
if, else, elsif, unless, and i think while statements
always end with end

the index for an array starts with 0 being the first number
[ 1, 2, 3, 4 ]

so array[0] would = 1

there are different methods to manipulate or get data
such as:
.times
gets.chomp
.upcase
.downcase
.length
.split
.each
.loop
.to_i
.to_s

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

If this post resonated with you, feel free to hit ❤️ or leave a quick comment to share your thoughts!

Okay