Hacker News new | ask | show | jobs
by z3t4 4026 days ago
For anyone wanting to do graphics in web pages I would recommend looking into the canvas tag. Example code:

  with (context) {
    beginPath();
    moveTo(100, 100);
    lineTo(100, 300);
    lineTo(300, 300);
    closePath();
    stroke();
  }
1 comments

Since ES5, you can't use `with` in strict mode.

Well, you shouldn't use it anyways since it's confusing/ambiguous and it's also terrible for performance.

I wanted to make a point about all the confusing new features of ES6 that are just there to save a few key strokes, and will haunt you forever.