Mode:
Duration:
1
2
3
4
arr = [1,2,3,4,5]
arr.each do |x|
puts x if x.even?
endCoding works best on desktop or with an external keyboard.
arr = [1,2,3,4,5]
arr.each do |x|
puts x if x.even?
endCoding works best on desktop or with an external keyboard.
Prints even numbers from an array.
arr = [1,2,3,4,5]
arr.each do |x|
puts x if x.even?
endCrystal is a modern, statically typed, compiled programming language with syntax heavily inspired by Ruby. It aims to combine the efficiency and speed of compiled languages with the readability and productivity of Ruby, supporting type inference, concurrency, and high-performance applications.
Origin & Creator
Crystal was created by Ary Borenszweig, Juan Wajnerman, and Brian Cardiff in 2011, inspired by Ruby’s syntax and modern systems programming needs.
Industrial Note
Crystal is used in web backend frameworks, DevOps tooling, microservices, and performance-critical tasks where Ruby-like syntax with compiled efficiency is desirable.