Idioms as Code

This is silly.

I wrote code depicting common idioms. You read the code and try to guess the idiom.

Answers are below the code (and, for clients viewing in supported readers, appear upside down like a children’s book).


pen > sword
>>> true

The pen is mightier than the sword


injury + insult

Adding insult to injury


let cost = arm + leg

Cost an arm and a leg


let chickens = [];

// TODO don't do this
chickens.length;

hatch();

Don’t count your chickens before they’ve hatched


let your_court = [ball];

The ball is in your court


if (numOfDancers === 2) {
    tango()
}

It takes two to tango


my_madness.method()

There’s a method to my madness