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
const { createStore, combineReducers } = Redux; | |
// The Hero | |
const initialState = { | |
xp: 0, | |
level: 1, | |
position: { | |
x: 0, | |
y: 0, | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
Butts are wonderful! | |
</title> | |
</head> | |
<body> | |
<h1> | |
MARTA |
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
/*jshint multistr:true */ | |
var text = "One day Marta went to the shops and ate an entire chicken.\ | |
She was so full that the chicken wings came out of her back and Marta became a hybrid chicken human. As she went rabid and started pecking people Andrew started crying and shouting 'Marta! No!'. It was all very sad because they all died." | |
var myName = "Marta" | |
var hits = [] | |
for (var i = 0; i < text.length; i++) | |
{ | |
if (text[i] === 'M') |
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
var userChoice = prompt("Do you choose rock, paper or scissors?"); | |
var computerChoice = Math.random(); | |
if (computerChoice < 0.34) { | |
computerChoice = "rock"; | |
} else if(computerChoice <= 0.67) { | |
computerChoice = "paper"; | |
} else { | |
computerChoice = "scissors"; | |
} console.log("Computer: " + computerChoice); |