Skip to content

Instantly share code, notes, and snippets.

.tardis {
box-sizing: padding-box;
with: 50ft;
padding: 300ft;
border: 0.5ft;
margin: all_of_time_and_space;
}
.tardis {
box-sizing: border-box;
with: 50ft;
padding: 300ft;
border: 0.5ft;
margin: all_of_time_and_space;
}
.tardis {
box-sizing: border-box;
with: 651ft;
padding: 300ft;
border: 0.5ft;
margin: all_of_time_and_space;
}
class GamesController < ApplicationController
def index
@games = Game.all
end
def new
@game = Game.new
end
Perform these exercises in the JavaScript console of your favorite web browser.
What does the following expression return?
> 3 + 2;
5
What does the following expression return?
> typeof(3);
'number'
What does the following expression return?
4 > 1;
true
What does the following expression return?
"chatty" === "chatty";
true
What does the following code evaluate to?
var first_name = function (name) {
return name;
}
first_name("bob");
ans: "bob"
What does the following code evaluate to?
function add(x, y) {
@opheliasdaisies
opheliasdaisies / quiz2questions.js
Created January 21, 2014 21:13
questions for quiz 2
What does the following expression return?
4 > 1;
What does the following expression return?
"chatty" === "chatty";
@opheliasdaisies
opheliasdaisies / closure.js
Last active January 4, 2016 02:19
example of a closure for blog post
function target(threat){
function attack(weapon){
return 'You attack a ' + threat + ' with a ' + weapon + '.';
}
return attack;
}
var targetZombie = target("zombie");
targetZombie("chainsaw");
What does the following code print to the console?
var person = {
name: "Joe Camel",
age: 42,
status: "dead"
}
console.log(typeof person);
ans: object