{[['']]}
<script type="text/javascript">
var total = 0;var even = 0;
for ( x = 1, y = 1; x <= 100; x++, y++ ) {if ( ( y % 2 ) == 0 ) {
even = even + y;
}
total = total + x;
}
document.write ( "The sum of even values: " + even );
</script></head>
<body>Output:
The total sum: 5050
The sum of even values: 2550