# What am I doing wrong? JavaScript Help

**URL:** <https://forum.freecodecamp.org/t/what-am-i-doing-wrong-javascript-help/447136>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [February 19, 2021, 3:58am UTC](https://forum.freecodecamp.org/t/what-am-i-doing-wrong-javascript-help/447136 "2021-02-19T03:58:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![csmit147](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/csmit147/32/206354_2.png) [@csmit147](https://forum.freecodecamp.org/u/csmit147)\
**Post date:** [February 19, 2021, 3:58am UTC](https://forum.freecodecamp.org/t/what-am-i-doing-wrong-javascript-help/447136/1 "2021-02-19T03:58:13Z")

</div>

**Tell us what’s happening:**

```
  **Your code so far**

```

```js

let funModule = (function() {
return {
  isCuteMixin: function(obj) {
    obj.isCute = function() {
      return true;
};
};
let singMixin = function(obj) {
obj.sing = function() {
  console.log("Singing to an awesome tune");
};
};
  singMixin: function(obj) {
    obj.sing = function() {
      console.log("Singing to an awesome tune");
    };
  }
};
})();

```

```
  **Your browser information:**

```

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36`.

**Challenge:** Use an IIFE to Create a Module

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [February 19, 2021, 4:09am UTC](https://forum.freecodecamp.org/t/what-am-i-doing-wrong-javascript-help/447136/2 "2021-02-19T04:09:37Z")

</div>

Hi @csmit147 !

Welcome to the forum!

Two things.

You have an extra singMixin when you only need one.  
So I would delete this first one.

```auto
let singMixin = function(obj) {
obj.sing = function() {
  console.log("Singing to an awesome tune");
};
};

```

You have a syntax error.  
The console error message says this

```auto
SyntaxError: unknown: Unexpected token, expected "," (7:1)

   5 | return true;
   6 | };
> 7 | };
     | ^

```

It tells you where the issue is and how to fix it.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [August 20, 2021, 4:09pm UTC](https://forum.freecodecamp.org/t/what-am-i-doing-wrong-javascript-help/447136/3 "2021-08-20T16:09:42Z")

</div>

Closed on August 20, 2021, 4:09pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
