JS App  •  08/10/2026
TNT JS Apps — Math, Music & Code

Mama’s Little Function

A function is like a blender: input goes in, output comes out.
Sung to the tune of Short’nin Bread — and yes, JavaScript is required.

A function is like a blender or an oven. It takes input, does some sort of action, and delivers output, hopefully delectible!

It's a super important idea in math and computer science, and to honor that concept, we dedicate this song, sung to the children's tune of 'Short'nin Bread'

We deliberately soft-petaled the Bootstrap in the song lyrics, preferring instead to use more traditional CSS.

Watch out though...

What if functions can't function? Perhaps some dodo disables JavaScript? What happens then? Try it and see!

Danger Will Robinson! If you disable JavaScript, be sure to reenable it when you're done field-testing!

If you care about such things, you'll notice that this page does not validate. We know. It's a compromise we made to illustrate how to alert a user about disabled JavaScript.

Mama's Little Function

Got a baby function
Named f(x)
He takes a '2' and adds 3x.
Give him a two, now the answer's great:
f(2), (y!), it equals 8!


Chorus:

Mama's little function eats xs, xs
Mama's little function yields f(x) (twice)