A Pen by janzeteachesit on CodePen.
Created
February 17, 2017 08:00
-
-
Save janzeteachesit/7dba66bf3d68b4c165ab93abf330e661 to your computer and use it in GitHub Desktop.
Chapter 1: Tennis_Step02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
As long as it's between the start and end marks then it's a valid comment and won't show up on the page. But people can View Source in their browser and see it! | |
--> | |
<canvas id="gameCanvas" width="800" height="600"></canvas><!-- //// --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Utilising CodePen JavaScript Console (//codepen.io/nullobject/pen/cngzI) | |
made with love by @nullobject (http://joshbassett.info), 2014. | |
Stuff from tutorial not needed in CodePen | |
<!DOCTYPE>, <html>, <head> <body> tags | |
window.onload = function script | |
grist for this pen: | |
*/ | |
// console.log("Hello, World!"); | |
// console.log("Here's another line of text going to the JavaScript console"); | |
// console.log("Jimmy Joe Bob!"); example of commenting out. | |
// console.log("PROGRAMMING RULES OMB WHEEEEEEE!!1!!1!ONE"); | |
/*Here's how a multi-line comment looks in JavaScript. Just like the HTML one it won't be used by the browser, but is still visible when someone does a View Source.*/ | |
/* | |
////; a signal that this needs to/will be changed later. | |
*/ | |
var canvas; //// | |
var canvasContext; //// | |
canvas = document.getElementById('gameCanvas'); //// | |
canvasContext = canvas.getContext('2d'); //// | |
canvasContext.fillStyle = '#222'; //// | |
canvasContext.fillRect(0, 0, canvas.width, canvas.height); //// | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//codepen.io/nullobject/pen/cngzI"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="//codepen.io/nullobject/pen/cngzI" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment