notes from 2015
is an object-oriented computer programming language commonly used to create interactive effects within web browers.
is a storage location paired with an associated symbolic name (an identifier), which contains some known or unknown quatity of information referred to as a value.
is a stored piece of information (stored data) that can be changed.
- Named Container for Storing Values
- Can be set to anything
- Declared using the var keyword
must start your variable with letters or “_”
== is exact comparison
!== not the same
=== is strict comparison
is a piece of data with predefined characteristics.
Modifying HTML Content
Q: What property of the full mark up of an element is used to get its contents?
A: The “.innerHTML” property
- document.getElementById(‘par2’); from <p id=”par2″>paragragh2</p>
document.getElementById(‘par2’).innerHTML = “Loading Amendments…”
(or method) is a prewritten set of instructions that may or may not return a value.
A: The “function” keyword.
- Block of code designed to perform a particular task
- Only runs when called
- Declared using the function keyword
• What is a Server?
• Web Hosting Services
• Introduction to XAMPP
• Putting Content Online
• Getting our web application to “think”
• Conditional logic, loops, and arrays
– Deductive Reasoning:
Q: If a card has a vowel on one side, it must have an even number on the other side
A. K. 2. 7.
A: Should be A and 7. (May be adding K as well, as you want to make sure the other side of K is not an even number.)
Which card(s) must be turned over to determine whether or not the rule has been followed?
Conditional Statement: is a if-then statement in which a hypothesis is followed by a conclusion.
The ‘if’ Statement
- Found in every piece of software
- Found in every web application
- Simplest and most popular method to create conditional statements in programming
- Checks if the condition, or hypothesis, is met
- Executes some code, or conclusion
The ‘else’ Statement
• Used at the end of an ‘if’statement
• Executes code when the ‘if’condition is not met
// for( i = 0; i
for( i = 0; i