This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function power(base, exponent) { | |
var result = 1; | |
for (var count = 0; count < exponent; count++) | |
result *= base; | |
return result; | |
} | |
show(power(2, 10)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 1000; i++) { | |
if (i % 3 == | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 1000; i++) { | |
if (i % 3 == | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 0; | |
var counter = 1; | |
while (counter < 101) { | |
result = result + 1 + counter; | |
counter++; | |
} | |
show(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 0; | |
var counter = 1; | |
while (counter < 101) { | |
result = result + 1 + counter; | |
counter = counter++; | |
} | |
show(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 0; | |
var counter = 1; | |
while (counter < 101) { | |
result = result + 1 + counter; | |
counter = counter + 1; | |
} | |
show(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 0; | |
var counter = 1; | |
while (counter < 101) { | |
result = result + 1; | |
counter = counter + 1; | |
} | |
show(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 1; | |
var counter = 0; | |
while (counter < 100) { | |
result = | |
counter = counter + 1; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 1; | |
var counter = 0; | |
while (counter < 99) { | |
result = result + 1; | |
counter = counter + 1; | |
} | |
show(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = 1; | |
var counter = 0; | |
while (counter <= 100) { |
NewerOlder