< Homepage

A cat function printing itself

Objective

Complete the given function skeleton in order to make it print the ascii cat contained inside.

Once executed in node of in a browser, the code must print the exactly what is given below. You cannot use node to read the file itself, or print a string.

Example:

Execute your js file in node or in you browser, it must print this:

ain't that cat cut as fuck

How

Instructions

Start with this code snippet and add stuff to acheive your goal:

function cat() {
     |\___/|
    =) ^Y^ (=
     \  ^  /
      )=*=(
     /     \
     |     |  _
     | | | | / )
     | | |_|/ /
     /_/_/____/
}
  1. The less code line the better

Expected time to resolution

10 minutes

Expected number of lines

You should need to add only one line.

Lost?

  • Logging a function directly won't give a stringified version of it. You will need to find a trick to do that. A trick that you probably know and use for other non-string stuffs...

Definitely lost?

Show solution