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

"use strict" is accepted only inside a function but it isn't allowed to omit it. What can I do about that?

Every time I write a function using a text editor (Dreamweaver) it's not allowed to omit "use strict", but when I add it to the js file, it respondes in an error message: "use the function form" (so I need to declare it in every single function I write) any idea what I can do about that? I literaly can not work until I fix that.

Edit: I can not use ES2015 features in my text editor, I also posted a question about that. Maybe it is related to that issue.

1 Answer

Steven Parker
Steven Parker
231,248 Points

The message about using 'function form" might just be a warning, it's certainly not a requirement of the language. And either way, there might be a configuration setting in the editor that would allow you to turn checking on or off.