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 compare = function(choice1,choice2) | |
{ | |
if (choice1 === choice2) { | |
return "The result is a tie!"; | |
} | |
else if (choice1 === "rock") { | |
if(choice2 ==="scissors") { |
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 isEven = function(number) { | |
// Your code goes here! | |
if (number % 2 === 0) | |
return true; | |
else | |
return false; | |
}; |
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
// behold, an object. | |
var neutralFolk = {}; | |
// when I go to check this, I get an "unexpected token ." syntax error. Why? | |
var enemies = { | |
enemies.khan = {}; | |
enemies.salazar = {}; |
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
// First we define zee objects... | |
var friends = { | |
bill: { | |
firstName: "Bill", | |
lastName: "Grates", | |
number: "613-555-7310", | |
address: ['123 Any Street', 'Ottawa, ON', 'K2P 1Y8'] }, | |
steve: { | |
firstName: "Steve", | |
lastName: "Jerbs", |
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
// So here's my jQuery script. | |
$(document).ready(function(){ | |
$("#one").after("<p>Awesome funtimes for all!</p>"); | |
$("#two").after($("p")); | |
$("p").remove(); | |
}); | |
//how does it know that by "p" I mean my paragraph? I don't declare it as a variable... | |
// but it still moves it after #two and removes it... why is that? |
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
app.controller('MainController', ['$scope', function($scope) { | |
$scope.exercises = [ | |
{ | |
icon: 'img/pushup.jpg', | |
name: 'Pushups', | |
count: 20 | |
}, | |
{ | |
icon: 'img/squat.jpg', | |
name: 'Squats', |
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> | |
<link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" /> | |
<link href='https://fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'> | |
<link href="css/main.css" rel="stylesheet" /> | |
<script src="js/vendor/angular.min.js"></script> | |
</head> | |
<body ng-app="MoveLogApp"> | |
<div class="header"> |
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
app.controller('MainController', ['$scope', function($scope) { | |
$scope.move = { | |
icon: 'img/move.jpg', | |
title: 'MOVE', | |
developer: 'MOVE, Inc.', | |
price: 0.99 | |
}; | |
$scope.shutterbugg = { | |
icon: 'img/shutterbugg.jpg', |
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> | |
<link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" /> | |
<link href="css/main.css" rel="stylesheet" /> | |
<!-- Include the AngularJS library --> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script> | |
</head> | |
<body ng-app="AppMarketApp"> |
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
app.controller('MainController', ['$scope', function($scope) { | |
$scope.program = [ | |
{ | |
series: "Sherlock", | |
series_img: "img/sherlock.jpg", | |
genre: "crime drama", | |
season: 3, | |
episode: "The Empty Hearse", | |
description: "Two years after his reported Reichenbach Fall demise, Sherlock, who has been cleared of all fraud charges against him, returns with Mycroft's help to a London under threat of terrorist attack. John has moved on and has a girlfriend, Mary Morstan. Sherlock enlists Molly to assist him, but when John is kidnapped by unknown assailants and is rescued by Sherlock and Mary, John returns to help find the terrorists and an underground plot to blow up the Houses of Parliament during an all night sitting on Guy Fawkes Night.", |
OlderNewer