why did They use end two times in this program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why did They use end two times in this program?

class Person def initialize puts "Hi there" end end p1 = Person.new p2 = Person.new # Output: # "Hi there" # "Hi there"

15th Sep 2018, 12:07 PM
Eshwar . E
Eshwar . E - avatar
1 Answer
0
one end encloses the class and second encloses initialize
15th Sep 2018, 12:16 PM
magicalKhachapuri
magicalKhachapuri - avatar