April Fools’ Day in JavaScript

We have JavaScript, we have also the April Fools’ Day, and that is a good opportunity to get away for the ordinary code and have some fun (I know, I know, JavaScript code by itself can sometimes give a lot of entertainment).

April Fools’ Day in JavaScript

First of all — an implementation for today:

getRandomNumber() {
    return 17; // o_O

Yes — JavaScript also knows some jokes 😉

And besides I’ve got some JavaScripts for jokers, namely Fool.js:


By the way, the download link on this website doesn’t work, but you can find it quickly after searching:


Is this code implemented by Mr. T?


Anyway the library (actually jQuery plugin) may be helpful in implementing various jokes in JS, such as hiding random items, playing annoying video, etc.

The usage is really simple:

$(document).ready(function() {
  $.fool('rick'); //  Run the Rick Astley prank

A small demo-joke available here 😀

And by the way the plugin itself is a cool piece of code to analyze. In the end, even making jokes can learn us something 🙂


There is no summary 🙂 Just do someone a joke 🙂

Have fun!