Write a JS function which receives a class and attaches to it a property species and a function toSpeciesString(). When called, the function returns a string with format:
I am a <species>. <toString()>
The function toString is called from the current instance (call using this).
Input:
Your function will receive a class whose prototype it should extend.
Output:
There is no output, your function should only attach the properties to the given class’ prototype.
Example:
function extendClass(classToExtend) {
//TODO
}