All JavaScript should be written with “use strict” mode on. Need Help

Hello,

I got a soft-rejection as
All JavaScript should be written with “use strict” mode on. For example, you can do this with jQuery as follows:
(function($) {
“use strict”;
// Author code here
})(jQuery);

Is this is required for third-party scripts such as owl-carousal,popper etc…

Yes, all javascript files must have use strict.

Add it fix your code resubmit and you will be fine :slight_smile:

1 Like

third-party scripts such as owl-carousal,popper etc should already used and if you check you will find: “use strict”;
So, you should to take care your item main js (written by you).

2 Likes

@FWDesign @mgscoder Thanks for your help

1 Like

@FWDesign @mgscoder I have checked all the javascript files but in some of the third-party scripts “use strict” is used such as

bootsrap.js
owl carousal.js
popper.js
countdown.js

There are many third-party scripts not using “use strict” such as

modernizr.js
counter.js
confetti.js
snap.svg.js
step.js
wow.min.js
jquery-appear.js
jquery-easing.js
jquery-smartmenus.js
jquery-countdown.js
jquery-magnific-popup.js

Should I add “use strict” manually to these files?. And I also added “use strict” to item main js (written by me).

you should to confirm you have added “use strict” to item main js and other js (written by you or from your coding) but you can avoide third-party scripts and keep as it is.

1 Like