Compiler
JS
JS Operators
Run
<!DOCTYPE html> <html> <body> <h1>JavaScript Assignment Operator</h1> <script> var x; x = 10; document.write(x + "<br>"); // Assign x = 20; x += 30; document.write(x + "<br>"); // Add and assign x = 50; x -= 20; document.write(x + "<br>"); // Subtract and assign x = 5; x *= 25; document.write(x + "<br>"); // Multiply and assign x = 50; x /= 10; document.write(x + "<br>"); // Divide and assign quotient x = 100; x %= 15; document.write(x); // Divide and assign modulus </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