For this example of a Command pattern, we will create a simple “Interpreter” object and a basic “Command” object and demonstrate their respective use. Let’s first start with the “Interpreter”: [codesyntax lang=”javascript”] var Interpreter = { execute: function(command){ //split on the space var commandArray = command.split(” “); try{ //use first entry as command name var […]
I'm Live!
Watch Now