Java Script/Basic Code
From r00tedvw.com wiki
(Difference between revisions)
Line 7: | Line 7: | ||
Information pop-up | Information pop-up | ||
alert("") | alert("") | ||
+ | ;Data Sets | ||
+ | :numbers (3, 42, etc) | ||
+ | :strings ("This is a string", "42", "is also a string") | ||
+ | ;Booleans | ||
+ | :true or false statements, such as (7<10) or (10<7) | ||
+ | ;if/else | ||
+ | :example | ||
+ | if (boolean) { | ||
+ | statement} else { | ||
+ | statement] |
Revision as of 02:24, 5 March 2013
Confirm pop-up (with ok or cancel response)
confirm("I feel awesome!");
Input prompt pop-up
prompt("Enter your name:");
Print out values for each line of code
console.log()
Information pop-up
alert("")
- Data Sets
- numbers (3, 42, etc)
- strings ("This is a string", "42", "is also a string")
- Booleans
- true or false statements, such as (7<10) or (10<7)
- if/else
- example
if (boolean) { statement} else { statement]