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
  • 769
  • 1
  • 8
  • 23

1 Answers1

2

Use this:

var width = window.innerWidth,
    height = window.innerHeight;
AJStacy
  • 5,175
  • 4
  • 17
  • 31