Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
!!!5
html
  head
    title YUI Node create
    meta(charset="utf-8")
    script(type="text/javascript",src="http://yui.yahooapis.com/3.10.0/build/yui/yui.js")
  body
  
 
invoke = (f, start, interval, end) ->
  start = 0  unless start
  if arguments.length <= 2
    setTimeout f, start
    undefined
  else
    repeat = ->
      h = setInterval(f, interval)
      if end
        setTimeout (->
          clearInterval h
        ), end
    setTimeout repeat, start
    undefined
i = 0
writeNumber = ->
  document.writeln(i++)
invoke(writeNumber,1000)
invoke(writeNumber,1000,2000)
invoke(writeNumber,1000,2000,6000)
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
fsy0718pro
0viewers