Ruby Object Mutability

puts ‘What is your name?’
name = ‘nathan’
puts ‘Hello ‘ + name

Copying the Variable

new_name = name

Reassigning the Variable

Mutability

x = 1
x += 1
print(x)

Conclusion

--

--

--

Developer💻 | Entrepreneur💡| Awesome😎

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Infrastructure Automation Made Easier with Ansible

Vessel Segmentation With Python and Keras

Android Application Development — Business at Customers’ Fingertips

Mutable, Immutable… everything is object!

Keys in DBMS

Crystal Cove: Creating a functional Web App in Crystal Language

The role of In-Memory Data Grids in Event Driven & Streaming Data Architectures

FIRST DJANGO SERVER RUN

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nathan O'Donnell

Nathan O'Donnell

Developer💻 | Entrepreneur💡| Awesome😎

More from Medium

My First Medium

JavaScript & Ruby on Rails Project — Flatiron School

Password encryption with bcrypt and Rails

About Ruby on Rails