2
I am studying Javascript and came across Strict Mode (use strict
). I wonder if it works with the frameworks Javascript if I put this command in a file .js
, or if it only works with pure Javascript? Because it is only supported by the latest versions of some browsers, it is currently possible to use it?
Would it be a good idea to start developing a project using this directive, knowing that older browsers ignore it? Wouldn’t create any unexpected problems?
– Alexandre Peluchi
In general yes. The fact of being ignored is not a problem in the functioning of script because it will only allow things that are probably not in your code that must have been tested with enabled mode. It can become a problem when you start mixing code that is well adapted to the mode and not adapted code. In general codes of these frameworks are written with this in mind. And even when it doesn’t, it will be rare, but not impossible, to cause some problem with other codes.It would only happen if an excerpt that is not there Strict require another not to be working. Only poorly done code does this
– Maniero
Got it thank you!
– Alexandre Peluchi