No More Best Practices

Stan Lo
Stan Lo
Oct 7, 2017 · 2 min read
for _, elem := range elements {
// Do something
}
elements.each do |elem|
# Do something
end
i = 0

while i < elements.length do
elem = elements[i]
# Do something
i += 1
end
for elem in elements do
# Do something
end

Conclusion

goby-lang

This is the official blog of Goby programming language

Stan Lo

Written by

Stan Lo

Creator of Goby language(https://github.com/goby-lang/goby), also a Rails/Ruby developer. Love open source, cats and boxing.

goby-lang

goby-lang

This is the official blog of Goby programming language