This file contains hidden or 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
// Code 1 | |
var doStuff = function() { | |
// More code here | |
}; | |
// Code 2 | |
function doStuff() { | |
// More code here | |
} |
This file contains hidden or 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
/* | |
See "Hoisting Section" on: | |
http://dailyjs.com/2012/07/23/js101-scope/ | |
*/ | |
/* | |
**QUESTION** | |
Why does Code 1 evaluate to "undefined" and Code 2 evaulate to "1". | |
I thought both codes would evaluate to "1" because of hoisting. | |
*/ |
This file contains hidden or 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
// From "Constructors with Methods" > 24/33 > Objects I > CodeAcademy.com | |
// QUESTIONS: | |
// 1. In line 19, why does the [rex] property, which is assigned to the [area] object, get a [calcArea] value? Or is it called a [calcArea] method of the [rex] property? | |
function Rectangle(height, width) { | |
this.height = height; | |
this.width = width; | |
this.calcArea = function() { |
This file contains hidden or 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
// From "Passing Objects into Functions" > 28/33 > Objects I > CodeAcademy.com | |
// QUESTIONS: | |
// 1. Per line 17, I understand that the I am passing the [ageDifference] object's properties as parameters into the [Person] constructor. Does an object always have access to an object constructor's properties when the [this] keyword is used, along with the object using the same properties as the object constructor? | |
// 2. Per line 17, what does the [return] keyword do? When should the [return] be used? | |
function Person (name, age) { | |
this.name = name; |
This file contains hidden or 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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript" scr="script.js"></script> | |
</head> | |
<body> | |
<p>Click to hide.</p> | |
</body> | |
</html> |
This file contains hidden or 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
@model ViewBag.Title = "Random"; | |
@{ | |
ViewBag.Title = "Random"; | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} | |
<h2>@Model.Name</h2> |
This file contains hidden or 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
<CATALOG> | |
<PLANT> | |
<COMMON>Bloodroot</COMMON> | |
<BOTANICAL>Sanguinaria canadensis</BOTANICAL> | |
<ZONE>4</ZONE> | |
<LIGHT>Mostly Shady</LIGHT> | |
<PRICE>$2.44</PRICE> | |
<AVAILABILITY>031599</AVAILABILITY> | |
</PLANT> | |
<PLANT> |
This file contains hidden or 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
<!-- HTML --> | |
<a href="#" id="link">My Kewl Link</a> | |
/* CSS */ | |
#link { | |
color: green; | |
text-decoration: none; | |
} | |
.active-blue { |