【笔记】设计模式及js实现(三)行为型模式

【介绍】记录11种行为型设计模式并通过js实现:职责链模式(Chain of Responsibility)、命令模式(Command);解释器模式(Interpreter);迭代器模式(Iterator);中介者模式(Mediator);备忘录模式(Memento);观察者模式(Observer);状态模式(State);策略模式(Strategy);模板方法模式(Template Method);访问者模式(Visitor)