- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
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 styleSet = { | |
boxShadow: "0 1px 3px rgba(0,0,0,0.5)", | |
textShadow: "1px 1px #000", | |
backgroundColor: "lightBlue", | |
padding: "1em", | |
margin: "2em 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>Looping in Javascript</title> | |
<script async src="blogpost.js"></script> | |
</head> | |
<body> | |
<section> | |
<h2>Here is our 1st section element.</h2> | |
</section> |
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
window.onload= function(){ | |
var styleSet = { | |
boxShadow: "0 1px 3px rgba(0,0,0,0.5)", | |
textShadow: "1px 1px #000", | |
backgroundColor: "lightBlue", | |
padding: "1em", | |
margin: "2em 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
def pig_latin(word) | |
if !!(word =~ /\s/) | |
split_sentence = word.split(' ').map {|w| w.split(//)} | |
translate_sentence(split_sentence) | |
else | |
split_word = word.split(//) | |
translate_single_word(split_word) | |
end | |
end |
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
class Car | |
@@WHEELS = 4 | |
def initialize(args) | |
@color = args[:color] | |
@wheels = @@WHEELS | |
end | |
def drive | |
@status = :driving | |
end | |
def brake |
- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
//------------------------------------------------------------------------------------------------------------------ | |
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work. | |
//------------------------------------------------------------------------------------------------------------------ |
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
//------------------------------------------------------------------------------------------------------------------ | |
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work. | |
//------------------------------------------------------------------------------------------------------------------ |