javascript tips (1)

  1.  running a function only once