This chapter has introduced each of the statements of the JavaScript language. Table 5.1 summarizes these statements, their syntax, and their purpose.
Statement | Syntax | Purpose |
---|---|---|
break |
break; |
Exit from the innermost loop. |
continue |
continue; |
Jump to top of containing loop. |
empty |
; |
Do nothing. |
for |
for (initialize ; test ; increment) statement |
Easy-to-use loop. |
for/in |
for (variable in object) statement |
Loop through properties of object. |
function |
function funcname([arg1 [..., argn]]) { statements } |
Declare a function. |
if/else |
if (expression) statement1 [ else statement2 ] |
Conditionally execute code. |
return |
return expression; |
Return a value from a function. |
var |
var name_1 [ =index.html value_1 ] [ ..., name_n [ =index.html value_n]] ; |
Declare and initialize variables. |
while |
while (expression) statement |
Basic loop construct. |
with |
with (object) statement |
Specify the current name space. |
file: /Techref/language/JAVA/SCRIPT/definitive/ch05_14.htm, 6KB, , updated: 2019/10/14 16:00, local time: 2025/5/2 05:28,
52.14.133.33:LOG IN
|
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/language/JAVA/SCRIPT/definitive/ch05_14.htm"> [Chapter 5] 5.14 Summary of JavaScript Statements</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
The Backwoods Guide to Computer Lingo |
.