mercredi 4 mai 2016

Is there any benefits of using Interpreter pattern?

Is there any benefits of using constructs like:

return "FIRTNAME LASTNAME" .replace(/FIRSTNAME/g, person.firstName) .replace(/LASTNAME/g, person.lastName)

comparing to plain simple return person.firstName + " " + person.lastName ?

Aucun commentaire:

Enregistrer un commentaire