You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
346 B
10 lines
346 B
// Fonction pour étendre le prototype d'Array avec une nouvelle méthode print
|
|
export function loadExtensions() {
|
|
// Ajout de la méthode print au prototype d'Array
|
|
if (!Array.prototype.displayJoke) {
|
|
Array.prototype.displayJoke = function () {
|
|
return this.map((item) => item.description() + '\n')
|
|
};
|
|
}
|
|
}
|