JavaScript Tutorial/Operators/Comma Operator — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:24, 26 мая 2010
, (Comma)
Syntax statement1, statement2, statement3
The comma allows multiple statements to be executed as one statement.
The value returned from this operation is the return value of the right-most statement.
<html>
<script language="JavaScript">
<!--
x = (y = 3, z = 9);
document.write("x = ",x,"<br>y = ",y,"<br>z = ",z);
-->
</script>
</html>