DEV Community

[Comment from a deleted post]
Collapse
 
abdelrahman_hussein profile image
AbdelRahman Hussein Mahmoud

yeah, js have a lot of flexibility, but watch out while using a variable without declaring, it is not a good approach and will be in a global scope and that is why there is 'use strict'.

Collapse
 
devoresyah profile image
DeVoresyah ArEst

yes I know, just want to tell to everyone that js didn't strict as default, not like Java or PHP that will error if you forget to put ; at the end of the line