From 15b1b0b7cc40355e0ca3577494f07f5a9b0999fb Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Mon, 20 Feb 2017 18:28:41 +0100 Subject: [PATCH] fix(challenge): Typo in "OOP: Use an IIFE to Create a Module" --- .../object-oriented-programming.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json index 629d628b54c..d68e2499b84 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json +++ b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json @@ -1032,7 +1032,7 @@ "We can group these mixins into a module as follows:", "
let motionModule = (function () {
  return {
    glideMixin: function (obj) {
      obj.glide = function() {
        console.log(\"Gliding on the water\");
      };
    },
    flyMixin: function(obj) {
      obj.fly = function() {
        console.log(\"Flying, wooosh!\");
      };
    }
  }
}) (); // The two parentheses cause the function to be immediately invoked
", "Note that you have an immediately invoked function expression (IIFE) that returns an object motionModule. This returned object contains all of the mixin behaviors as properties of the object.", - "The advantage of the module pattern is that all of the motion behaviors can be packaged into a single object that can then be used by other parts of your code. Here is a example using it:", + "The advantage of the module pattern is that all of the motion behaviors can be packaged into a single object that can then be used by other parts of your code. Here is an example using it:", "
motionModule.glideMixin(duck);
duck.glide();
", "
", "Create a module named funModule to wrap the two mixins isCuteMixin and singMixin. funModule should return an object."