Pregunta de entrevista de HubSpot

Create the functionality "hello".addCommas(); in js

Respuesta de la entrevista

Anónimo

6 oct 2022

String.prototype.addCommas = function() {} The function being the one mentioned in the above question, but instead of taking a string as an argument to the function you can just use this, as this is the string the function is running on when you add the function to the prototype in this manner.