Skip to content

Instantly share code, notes, and snippets.

This is an array called gameOfThonesHouses. It is an array made up of objects. Each object represents a house in the game of thrones. Each house has a name, wikiSuffix, and people. People in a house is an array of objects. Each object represents a person. Each person has a name, description, imageSuffix, and wikiSuffix.

var gameOfThronesHouses = [
    {
      name: "Starks",
      wikiSuffix: "House_Stark",
      people: [
        {
          name: "Eddard \"Ned\" Stark",
          description: "Lord of Winterfell - Warden of the North - Hand of the King - Married to Catelyn (Tully) Stark",
HTML Resources
- http://www.w3schools.com/html/default.asp</a>
- https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Introduction
CSS Resources
- http://www.w3schools.com/css/default.asp
- https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
@MicFin
MicFin / index.html
Created August 10, 2015 16:27
vOPRdo
<h1>Happy Saturday, <span id="name">friend</span>!</h1>
// user select rocks, paper or scissors
function getUserChoice(){
var userSelection = prompt("Do you choose rock, paper or scissors?");
return userSelection;
}
// computer randomly selects rock paper or scissors
function getComputerChoice(){
// long comprison of each scenario
if (computerSelection === "rock" && userSelection == "scissors") {
console.log("Computer Wins");
} else if (computerSelection === "paper" && userSelection == "rock") {
console.log("Computer Wins");
} else if (computerSelection === "scissors" && userSelection == "paper") {
console.log("Computer Wins");
} else if (computerSelection === "scissors" && userSelection == "rock") {
console.log("User Wins");
@MicFin
MicFin / game_of_thrones.md
Last active September 17, 2018 00:26
A Variable of Game of Thrones

This is an array called gameOfThonesHouses. It is an array made up of objects. Each object represents a house in the game of thrones. Each house has a name, wikiSuffix, and people. People in a house is an array of objects. Each object represents a person. Each person has a name, description, imageSuffix, and wikiSuffix.

const gameOfThronesHouses = [
    {
      name: "Starks",
      wikiSuffix: "House_Stark",
      people: [
        {
          name: "Eddard \"Ned\" Stark",

Lets create a person in javascript. We could use a variable...

var person = "John Doe";

To print our persons name we could do...

var person = "John Doe";
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">

DO NOT COPY AND PASTE! You must type it all out yourself for this to be valuable. To make sure of that, the "quotation marks" in the code will copy and paste oddly so copy and pasting will not work :) Practice, practice, practice

Let’s create a person in javascript. We could use a variable...

var person = "John Doe";

To print our person’s name we could do...

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.slide-ruler{
background-color: green;
height: 50px;
width: 500px;
}
.slider{