Skip to content

Instantly share code, notes, and snippets.

@stujo
stujo / oojs.md
Last active June 27, 2018 05:31
Object Oriented JavaScript

#Object Oriented Javascript

#Overview

  • Creating Objects in JavaScript
    • new Object();
    • Object Literal Notation (Important)
    • Factory Function
  • Review JavaScript's this
  • More Creating Objects in JavaScript
  • Constructor Function
@baniol
baniol / canvas_bouncing_ball.html
Created March 29, 2014 09:29
canvas bouncing ball, javascript
<html>
<head>
<style type="text/css">
canvas{ border:#666 1px solid;}
</style>
<script type ="application/javascript" language="javascript">
var canvas;
var ctx;
var dx = 1;
var dy = 2;
var self = window;
(function(self) {
var canvas, context, particles = [], explode = true, FPS = 60;
/*
* Init.
*/