Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Js
let count = 0;
while (count < 10) {
  count++; 
  console.log('Hello');
};
for (let i = 0; i < 10; i++) {
  console.log("Hello");
}

let quarantines the scope of i to the loop, in ES6
console.log( 'Hello\n'.repeat(10) )

String built in function
[...Array(10)].forEach(() => console.log('Hello'))
with Ada.Text_IO;
use Ada.Text_IO;
for I in 1 .. 10 loop
  Put_Line ("Hello");
end loop;

New implementation...
< >
programming-idioms.org