numbers = [1,2,3]
total = 0
numbers.each do |number|
total += number
end
p total
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
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
Answer these Check for Understanding questions as you work through the assignments.
- What is HTML?
Hyper Text Markup Language - What is an HTML element?
An element has a start tag, content, and an end tag. - What is an HTML attribute?
All elements have attributes. They provide information about elements. They are always found in the start tag. - What is the difference between a class and an id? When would you use one vs. the other? Class can be used multiple times by multiple elements. ID can only be used by one specific HTML element within the page, can be used as a bookmark and refrenced later with an
href.