Find the errors in the following
1.)
# The ideal range of your motor cycle speed 20 - 55. Over 55 is SCAREE! | |
# Check if your moto_speed is within that range using boolean (&&, ||) | |
# operators and comparison operators (== =< >= !=) | |
# if your moto_speed variable is in the right range print out a good | |
# message, aka "Wheee!" Otherwise print out an appropriate response. | |
# Your code goes below: | |
if moto_speed >=20 && moto_speed <=55 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
a { | |
color: white; | |
text-decoration: none; | |
font-size: 40px; | |
} |
/** | |
* Javascript Exercise: Objects | |
*/ | |
/** | |
* Question 1: | |
* Modify the "booleanValue" function so that it returns "true" when it's called. | |
*/ | |
function booleanValue() { | |
return true; |
<html> | |
<head> | |
<title>!Quiz - Week 2</title> | |
</head> | |
<body> | |
<center> | |
<h1>Puppies - wait, is that a puppy?! </h1> | |
<img id="daPuppies" src="http://www.pomsky.org/wp-content/uploads/2013/03/97c0ca628ce111e2876222000a9f0a1b_7-300x300.jpg" width="300" height="auto" position="absolute" /> | |
<h3> don't forget to open your Chrome console </h3> | |
<button onclick="grow();">Bigger Puppies</button> |
$(function(){ | |
//alert("JQUERY LOADED!"); | |
//CHANGE THE DEFAULT BEHAVIOR OF THE FORM | |
$('form').on("submit", function(event) { //do something whenever a form is submitted | |
event.preventDefault(); //prevents the default submit behaviour. no longer refreshes page. | |
var searchTerm = $('input').val(); //targets the only input and saves its value | |
alert(searchTerm); |
body { | |
width: 750px; | |
font-family: "Helvetica Neue" Helvetica, sans-serif; | |
margin: 50px auto; | |
} | |
.red { | |
color: red; | |
text-decoration: line-through; | |
} |
#GroupGo Refectoring Notes
In your create method in the Entries Controller, remove this code:
if params[:email]
puts "*"*50
#p params
end
Also, remove this in your Submit method:
Today's assignment is to prepare a lesson on callbacks in Javascript. You should assume your students have a basic understanding of JS syntax, variables and functions but have never encountered an asynchronous function and have never heard the word 'callback'.
We suggest you cover the following topics in order:
# Building Ruby Familiarity | |
# In this exercise you will take a first look at some common commands in Ruby | |
# The idea here is to build familiary with Ruby syntax | |
# This will likely be the first time you've seen some of these commands | |
# Just type them in and see the displayed output | |
# Steps: | |
# 1. Open up a new terminal window | |
# 2. Launch irb |