James Steele2,816 Points
I get a strict mode error for my code below about a global variable?
My code to answer the task is as follows;
I get an error saying that strict mode prevents creation of a global variable which is $submit.
Is strict mode turned on in the treehouse environment? Is this something I can turn off I do I need to write my code differently?
Heidi FryzellFront End Web Development Techdegree Graduate 15,422 Points
There are a couple things I am noticing in your code. I think you want to use "const" to declare the variable, const will declare that variable and prevent it from being re-assigned, which is a good thing because you always want the variable to just select the class on the button and not change, like this:
const $submit = $('.submit-btn');
And you need to flag the "disabled" attribute as "true", like this:
Hope this helps! Heidi