Last active
March 4, 2016 17:19
-
-
Save dokipen/885a46fed98adb6da1cc to your computer and use it in GitHub Desktop.
This file contains 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 hello = 0; | |
var values = [1,2,3,4]; | |
for (var i = 0; i < values.length; i++) { | |
hello += values[i]; | |
} | |
console.log(hello); | |
# -------------------------------------- | |
hello = 0 | |
for i in [1, 2, 3, 4]: | |
hello += i | |
print hello | |
# -------------------------------------- | |
hello = 0 | |
[1, 2, 3, 4].each do |i| | |
hello += i | |
end | |
puts hello | |
# -------------------------------------- | |
$hello = 0; | |
$data = [1, 2, 3, 4]; | |
for ($i = 0; $i < count($data); $i++) { | |
$hello += $data[$i]; | |
} | |
echo($hello); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment