Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by jasonkester

5 years ago

It's not even sloppy

It’s the definition of sloppy. Rule One of Javascript is that you check every 3rd party dependency before every call.

  window.ga && ga(“user likes socks”);

For exactly this reason: because often all you get is what you sent down the wire yourself. You still need to work with that.

0 comments

jasonkester

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities