Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Matthew Lanin
seal-mask
.a{fill-rule:evenodd;}techdegree
Matthew Lanin
Full Stack JavaScript Techdegree Student 8,003 Points

Help with understanding of the module pattern.

Hi there, I'm working on project 4 of the FSJS tech degree, and after watching the video on the module pattern, tried to implement it in my project.

I'm worried I missed the point, however, so I was wondering if what I am doing is way off. Here is my js file: https://github.com/mhlan/tic-tac-toe/blob/master/js/main.js

Should I have simply wrapped the entirety of my code in a single, IIFE, and then my code within just your normal declarations, definitions, expressions, calls, etc? Or is the content of my code fine?

Any help would be appreciated, thanks in advance!