Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on An Introduction to JavaScript's "this". Parent comment
The first @condiments would define a class variable.
class HotDog attr_accessor :condiments end
class HotDog def initialize @condiments = nil end def getCondiments return @condiments end end
btw, I didn't show the attr_accessor meta-programming sine it hides the guts of the excercise.
The first @condiments would define a class variable.
Or for Java-socialized folks: