Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lemons = {}
- lemons.__index = lemons
- function lemons.init(name)
- local name = {}
- setmetatable(name,lemons)
- name.name = varName
- return name
- end
- function lemons:getName()
- return varName
- end
- function lemons:saying()
- print("Hello "..self.getName())
- end
- print("Enter your name here: ")
- input = read()
- lemonObject = lemons.init(input)
- lemonObject:saying()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement