1

Im building a pong clone, and I would like the playable area to be the same size as the browser window.

var width = 400,
    height = 600;
Kōdo no musō-ka
  • 759
  • 1
  • 7
  • 21

1 Answers1

2

Use this:

var width = window.innerWidth,
    height = window.innerHeight;
AJStacy
  • 5,105
  • 4
  • 15
  • 31