SyntaxFix
Write A Post
Hire A Developer
Questions
Instead of bar use self.bar or Foo.bar. Assigning to Foo.bar will create a static variable, and assigning to self.bar will create an instance variable.
bar
self.bar
Foo.bar