Class: JokeMachine

JokeMachine()

This class contains a list of funny jokes that can be added and getted.

Constructor

new JokeMachine()

Source:

Methods

addJoke(joke)

This function adds a joke into the inner array
Parameters:
Name Type Description
joke String A funny joke
Source:

getRandomJoke() → {String}

Return a random joke from the inner list
Source:
Returns:
A random joke
Type
String

sayRandomJoke()

Print on the console a random joke. I hope it is funny!
Source: