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 selection = ["Rock", "Paper", "Scissors"]; | |
var player = playerChoice(); | |
var computer = computerChoice(); | |
console.log(compare(player, computer)); | |
function playerChoice() { | |
var choice; | |
do { | |
choice = prompt("Rock(1), Paper(2), or Scissors(3)?").toLowerCase(); |
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 selection = ["Rock", "Paper", "Scissors"]; | |
var player = playerChoice(); | |
var computer = computerChoice(); | |
console.log(compare(player, computer)); | |
function playerChoice() { | |
var choice; | |
do { | |
choice = prompt("Rock(1), Paper(2), or Scissors(3)?").toLowerCase(); |
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> | |
<head> | |
<title>CSS Practice</title> | |
<link type="text/css" rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<div id="header"> | |
<h1>CSS Practice</h1> |
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
//make a function that takes in a string and capatalizes the first letter of every word and lowercase the rest | |
function capFirstLetter(str) { | |
str = str.toLowerCase().split(' '); | |
for(var i in str) { | |
str[i] = str[i].split(''); | |
} | |
for(var j in str) { | |
var holder = str[j][0].charAt(0).toUpperCase(); | |
str[j][0] = holder; | |
str[j] = str[j].join(''); |