Compiler
JS
JS Switch
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Switch</h2> <p id="demo"></p> <script> var d = new Date(); switch(d.getDay()) { case 0: document.getElementById("demo").innerHTML = "Today is Sunday."; break; case 1: document.getElementById("demo").innerHTML = "Today is Monday."; break; case 2: document.getElementById("demo").innerHTML = "Today is Tuesday."; break; case 3: document.getElementById("demo").innerHTML = "Today is Wednesday."; break; case 4: document.getElementById("demo").innerHTML = "Today is Thursday."; break; case 5: document.getElementById("demo").innerHTML = "Today is Friday."; break; case 6: document.getElementById("demo").innerHTML = "Today is Saturday."; break; default: document.getElementById("demo").innerHTML = "No information available for that day."; break; } </script> </body> </html>
Editor Commands
Commands
Shortcut Key (Win)
Shortcut Key (Mac)
selectAll
Ctrl-A
Cmd-A
singleSelection
Esc
-
killLine
-
Ctrl-K (Mac)
deleteLine
Ctrl-D
Cmd-D
undo
Ctrl-Z
Cmd-Z
redo
Ctrl-Y
Shift-Cmd-Z, Cmd-Y
undoSelection
Ctrl-U
Cmd-U
redoSelection
Alt-U
Shift-Cmd-U
goDocStart
Ctrl-Home
Cmd-Up, Cmd-Home
goDocEnd
Ctrl-End
Cmd-End, Cmd-Down
goLineStart
Alt-Left
Ctrl-A
goLineEnd
Alt-Right
Ctrl-E
goLineRight
-
Cmd-Right
goLineLeft
-
Cmd-Left
goLineUp
Up
Ctrl-P
goLineDown
Down
Ctrl-N
goPageUp
PageUp
Shift-Ctrl-V
goPageDown
PageDown
Ctrl-V
newlineAndIndent
Enter
-
save
Ctrl-S
Cmd-S