I was at a bar last night with a few of my colleagues. They said that it's a bad idea to extend the functionality of basic JavaScript Objects with a prototype method.For example, let's say you created a method for finding the factorialNumber.prototype.factorial = function(n) {  return n == 0 ? 1 : factorial(n - 1)}They said there was some danger to creating prototypes. Why would this be a bad practice?
What's wrong about extending a class with prototype methods?
javascript;functions;prototyping