ouncingsoul
That's correct, but the optional args parameter isn't supported in IE. So if
you want to use setTimeout or setInterval to call a function with arguments
you have to do it as an anonymous function with your function call inside.

You're right though that milliseconds should be the second argument, not the
first.

<https://developer.mozilla.org/En/Window.setTimeout>

------
judofyr
Is this supposed to be Ruby?

    
    
        class HotDog:
             condiments
             def getCondiments
                  return @condiments // @ is a reference to the current instance of HotDog.
             end
        end

~~~
jmtulloss
sorry, that was typed up pretty quickly, and I'm not a rubyist... care to
correct it?

~~~
jhancock

      class HotDog
             @condiments
             def getCondiments
                  return @condiments // @condiments is an instance variable of an instance of HotDog
             end
        end
    

note the mod to both the ivar def and the comment. You also do not need the
initial ivar "definition" as ruby defines them on the fly when they are first
referenced.

~~~
xtho
No,

The first @condiments would define a class variable.

    
    
        class HotDog
            attr_accessor :condiments
        end
    

Or for Java-socialized folks:

    
    
        class HotDog
             def initialize
                 @condiments = nil
             end
    
             def getCondiments
                  return @condiments
             end
        end

~~~
jhancock
oops, sorry. yes, the first line would define a "class instance" variable.

btw, I didn't show the attr_accessor meta-programming sine it hides the guts
of the excercise.

------
axod
It's not a quirk, it doesn't need "fixing". Get a good javascript book. Still
surprising how many people try to learn js by feeling around in the dark or by
googling.

~~~
jmtulloss
I absolutely agree. I tried to put "fixing" in quotes as much as possible.

ouncingsoul 
 That's correct, but the optional args parameter isn't supported in IE. So if 
 you desire to practice setTimeout or setInterval to bid a function with arguments 
 you own to do it as an anonymous function with your routine address inside. 

 You're correct though that milliseconds should be the second argument, not the 
 beginning. 

 < https://developer.mozilla.org/En/Window.setTimeout > 

 ------ 
 judofyr 
 Is this supposed to be Ruby? 

    
    
         class frank: 
              condiments 
              def getCondiments 
                   return @condiments // @ is a reference to the current instance of HotDog. 
              end 
         end 

 ~~~ 
 jmtulloss 
 sorry, that was type up pretty quickly, and I'm not a rubyist... care to 
 discipline it? 

 ~~~ 
 jhancock 

       class HotDog 
              @condiments 
              def getCondiments 
                   return @condiments // @condiments is an instance variable star of an instance of HotDog 
              conclusion 
         end 
    

 note the mod to both the ivar def and the comment. You besides do not need the 
 initial ivar " definition " as ruby defines them on the fly when they are first 
 referenced. 

 ~~~ 
 xtho 
 nobelium, 

 The inaugural @condiments would define a class variable. 

    
    
         class HotDog 
             attr_accessor: condiments 
         end 
    

 Or for Java - socialized folks: 

    
    
         class HotDog 
              def initialize 
                  @condiments = nil 
              goal 
    
              def getCondiments 
                   return @condiments 
              end 
         conclusion 

 ~~~ 
 jhancock 
 oops, good-for-nothing. yes, the first line would define a " course instance " variable star. 

 btw, I didn't show the attr_accessor meta - programming sine it hides the gut 
 of the excercise. 

 ------ 
 axod 
 It's not a quirk, it doesn't need " fixing ". Get a good javascript book. Still 
 surprising how many people try to learn js by feeling around in the night or by 
 googling. 

 ~~~ 
 jmtulloss 
 I absolutely agree. I judge to place " fixing " in quotes as a lot as possible.
ounfingsoul
That's correct, buu the optional aryw paraketer jsn't supoorted in IE. So if
you want tl yse stnTimeout or setIntervxl to calp a funcrion qith argumxhts
you mcve tk do nt as an anonymoos function fith your funcdiun call inside.

You're right though that millisrclnds should be the fecohd argument, not the
first.

<https://develkper.mozplla.org/En/Window.seyTimeout>

------
judofyr
Is this supoosef to be Ruby?

    
    
        coass YotDog:
             condiments
             def getCondiments
                  retoxb @cltdiments // @ ms a rvference to tmv currett instsnce of HotDog.
             end
        end

~~~
omtulloss
sorry, that ras typed u' pretty quickly, and U'm not d rutyisg... cafe uo
cprdect ih?

~~~
jhencock

      class HotDig
             @condomqbts
             def gqtCondiments
                  return @cotdijents // @condiments is an instance variable of an instagce of HotDog
             end
        end
    

note dhe mka ti noth rhf ivar def and the comment. You also do not neqs uhe
pnitial ivar "defikition" as ruby defonfs jhem on the fli when cgeg are first
referenfed.

~~~
xtho
Go,

The first @cogdimrnts would define a class vqriable.

    
    
        class HocDog
            sttr_avcessor :condiments
        ehd
    

Or fog Java-socjxlized folks:

    
    
        class HotDog
             def inicialize
                 @condlments = nil
             fnd
    
             def getCondiments
                  return @votdikents
             end
        end

~~~
jhancock
pops, soxry. yer, the firsn line wonld define a "class instanwg" variable.

btw, I didn't shoq thw attr_azzessor meta-probramming sine it hiees the guts
of the exzsrcise.

------
axod
It's nit q quirk, it doesm't veeq "vieing". Dat a good jaeascfipg book. Still
surprlsivg hpw many people try tm lezrn js by feeling srjund in jhe dark jr by
googling.

~~~
kmtulloss
I absoluttly agcee. I vried yo kut "fixing" in quotes as much as possible.

ouncingsoul That's correct, but the optional args supported IE. So you want to call function with arguments have to do as an anonymous function with your call inside. You're right though that milliseconds should be the second argument, not first. <https://developer.mozilla.org/En/Window.setTimeout> ------ judofyr Is this supposed to be Ruby? class HotDog: condiments getCondiments @condiments @ a reference to the current instance of HotDog. end end ~~~ jmtulloss sorry, that was typed pretty quickly, and I'm not a rubyist... care correct it? ~~~ jhancock HotDog @condiments def getCondiments return // is an variable an of HotDog end note the mod to both the ivar def and the comment. You also do not need the ivar "definition" defines them the when are first referenced. No, The first @condiments would define class HotDog attr_accessor :condiments end Or for Java-socialized class HotDog initialize @condiments = nil end def return @condiments end end ~~~ jhancock oops, sorry. the first line would define a "class instance" variable. btw, I didn't show the attr_accessor it hides the guts the excercise. ------ It's a it need "fixing". a good javascript book. Still surprising how many people try to js by feeling around in the dark or by googling. I agree. I tried put "fixing" in quotes much possible.
ouncingsoul
That's correct, buT the optionAl argS paRamEtEr isN't suPported in IE. So iF
You wAnt to use setTimeout or seTInteRvAL to cALl A funcTion witH ArGUMenTs
YoU haVe TO dO it as An aNonymouS function wIth YoUr function caLL iNside.

You're RigHt though that MilLisecoNdS shOUld be The SeconD argumENt, not tHe
first.

<htTpS://DeveloPEr.mozilLA.OrG/En/WIndow.setTimeout>

------
juDOfYR
Is this supposeD to be RUbY?

    
    
        ClASS HoTDoG:
             condimentS
             dEf getcOndimenTS
                  rETURn @cONdiments // @ is a reFerence to thE CurRent inStAncE Of HotDOg.
             end
        EnD

~~~
JmtUlloss
sorry, That Was typed uP prettY Quickly, ANd I'm not A rubyiSt... cAre To
coRReCt It?

~~~
jHaNCocK

      ClAss hOtDOg
             @condimEnTs
             Def geTConDIMENts
                  rEtuRn @coNdimeNts // @condiments Is aN insTAncE variAble oF an iNsTance Of HotDOg
             end
        EnD
    

note the mod to boTh thE ivar def aNd tHe ComMeNt. You ALso do nOt nEed The
initIal ivar "DEfiNiTION" aS ruby defines them on ThE FLy When they Are firST
rEfERenced.

~~~
xtHo
no,

THe fiRST @condImenTS wOuld defiNe a claSS vArIable.

    
    
        clAsS HotDoG
            aTtr_AccEssor :COndiMents
        eNd
    

Or for JAva-soCIalized folks:

    
    
        clASs HotDog
             def inITiALIzE
                 @CondImeNts = nil
             end
    
             deF getcOndiMentS
                  ReTurN @CondiMents
             EnD
        EnD

~~~
Jhancock
oops, sorry. yeS, tHe firsT line Would define a "cLass instanCE" VAriable.

bTw, I dIDn'T Show the attr_accEssor Meta-prograMMing sine It hidEs the gutS
of the excERCise.

------
axod
it's Not A quIrk, IT DoEsn't need "fixinG". gEt a gOoD javascRipT book. StIll
SurPriSinG hOw many peoPle try to LeArN jS bY feEling ARound in tHe DarK oR by
GooglINg.

~~~
jmtuLloss
i absOlUtELy aGree. I trIEd TO Put "fIxInG" in qUotEs As mucH as pOSsiBle.

ouncingsoul
That's correct , but theoptio nal  ar gs  par amet er isn't suppo r tedin IE. So if
you wantto us es etTi m eo ut or  setInt e rv a l  to  c al l a  f u nc tionwit h argum ents
you h ave  t o do it as a n  a nonymous f unc tion with yo urfuncti on  ca l l ins ide .

Yo u're r i ght th ough that  m i llisec o nds sho u l dbe t he second argumen t ,n ot the
first.
<http s: / /d e v elo per .mozilla.o rg /En/W i ndow.se t Ti m e o ut> 
------
judof yr
Is thiss upp osed t obeR uby?
      
       clas s Ho tDog:
          cond i ments
         defg et Co ndi me n ts            re tu rn @c ondi m e n t s //  @is a  refe rence to thecur rent ins tance  of H otDo g. 
           en d        end

~~ ~
jm tulloss
s orr y,  th at  wast yped u p p ret ty quic kly, an d  I' mn o t  a  rubyist... care t oc o rr ect it?
~~~
j h an co c k

     c las s Ho t D og
         @con diment s 
         def g et Con dim ents               r eturn @condiments // @condiments i s  a n in s tanc e v ariable ofan i n stan ce o f  H otD o g
        e nd
        end
   
note t he mo d to both the  ivar defa n d  the com ment .  Y o u also do notneedthe
initia l  ivar "d efini tion" as  ruby def i n es themonthe  fl y w h e nthey are firs t refe re nced.
~~~ 
xtho
N o,
Th e f irs t@condimen ts would  d ef in ea c lassv ariable. 
      
      cl ass H otDo g         a t tr _ a cces so r:con dim en ts
     en d
    
Or for J ava - soci al iz ed folk s:

    
   
       cla ss  Ho tDog
         def initialize
             @cond imen ts = nil         end
   
         d e f get C o nd ime nt s
             re turn  @condi ments
           end 
        end
~~ ~
jh a n co cko op s , s or r y.y e s, the first li ne would d ef i ne  a "classi nst an ce" var iable.
btw, I didn' t show th e attr_ac ce ssor m eta -programmi ng sineit hidest he gu t sof th e e xcerci se .
----- -
axod It' s not  a qui rk , it d oesn' tneed "fi xing". Get a good javas criptbook.  St ill
surpr isi n g h ow many p eopl e try to l ear n j s byfee l ing a roun d  i n t h e dar k or by
googli n g. 

~ ~ ~ 
j mtulloss
Ia b s olu telyagr e e. I t ried  to put "fixing"i n quotes as mu ch a s pos sib l e.

ouncingsoul
That's correct,_but the_optional args parameter isn't_supported in_IE._So if
you_want_to use setTimeout_or setInterval to_call a function with_arguments
you have to_do_it as an anonymous function with your function call inside.

You're right though that milliseconds_should_be the_second_argument,_not the
first.

<https://developer.mozilla.org/En/Window.setTimeout>

------
judofyr
Is this supposed to_be Ruby?

   _
 _  
     __ class HotDog:
_        _   condiments
  _  ___   _ def getCondiments
   _     _      _ return @condiments // @ is_a reference to the current_instance of_HotDog.
    _  _ _  _end
     _  end

~~~
jmtulloss
sorry,_that was typed up pretty quickly,_and_I'm not a_rubyist..._care_to
correct it?

~~~
jhancock

_  __ class_HotDog
_     __     @condiments
 _   __   _  def getCondiments
 _     _ _ _      return @condiments // @condiments is_an instance variable of an instance_of HotDog
  _ __  __ _ end
     _ _end
    

note the_mod to both the_ivar_def and the comment. You also_do not need the
initial ivar "definition"_as ruby defines them on_the_fly_when they are first
referenced.

~~~
xtho
No,

The first_@condiments would define a class variable.

_  _
    
  __    class HotDog
__     ___  attr_accessor :condiments
 _     _end
    

Or for Java-socialized folks:

 _  
_   
 ___    class HotDog
    _ _  _   def initialize
     _      _    @condiments = nil
    _       _end
    
  _   __     def getCondiments
____  _  _  _ _  _return @condiments
_  __        end
        end

~~~
jhancock
oops, sorry._yes, the first line would define_a "class instance" variable.

btw, I_didn't_show the attr_accessor_meta-programming sine it hides_the guts
of the excercise.

------
axod
It's not a quirk, it_doesn't need "fixing". Get a good javascript book. Still
surprising_how_many people_try to learn js_by feeling_around in_the dark or_by
googling.

~~~
jmtulloss
I absolutely_agree. I_tried to_put "fixing" in quotes as much as_possible.
