View protips.js
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
View README.md
View README.md
View README.md

Meteor namespacing, specifically package scope variables, don't seem to work as described in the namespacing section of the docs.

From what I can tell, when the var keyword is omitted, actual globals are created. (I'm running 0.6.5)

To run this:

$ meteor create globalcheck

then copy these files into globalcheck (overwriting the default files)

View gist:5919946
package net.bruceharris.test.inheritance;
import static org.junit.Assert.assertEquals;
import org.junit.Assert;
import org.junit.Test;
public class InheritanceTest {
private Child c = new Child();
View index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="lib/jasmine-1.2.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="lib/jasmine-1.2.0/jasmine.css">
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine.js"></script>
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine-html.js"></script>
View index.md

JavaScript's Prototype System

When I ask interview candidates to explain what prototypes mean in JavaScript, the response is often something like this

Here's my attempt to explain it succinctly.

I think it's important to draw the distinction between 2 related concepts: the prototype property of functions, and the prototype of an object

The prototype property of functions

View 02.asciidoc

JavaScript II - Objects, Arrays and Booleans

Content and target audience

JavaScript II - Objects, Arrays, and Booleans

Laying the foundation for object oriented programing in JavaScript.

View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CodePen &middot; A Pen by bruceharris</title>
<!--
Copyright (c) 2012 Bruce Harris, http://codepen.io/bruceharris
Permission is hereby granted, free of charge, to any person obtaining