Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Js

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

const greet = who => console.log(`Hi ${who}!`)

Arrow function syntax. It consists of three parts: arguments, arrow and code block.
let dog = 'Poodle';
const dogAlert = () => alert(dog);
function bli() { 
	console.log('Hello World!!!');
}
var bli = function() { 
	console.log('Hello World!!!');
}
procedure Finish (Name : String) is
begin
   Put_Line ("My job here is done. Goodbye " & Name);
end Finish;

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