How to remove global “use strict” added by babel

As it has already been mentioned for Babel 6, it’s the transform-es2015-modules-commonjs preset which adds strict mode. In case you want to use the whole es2015 preset without module transformations, put this in your .babelrc file: { “presets”: [ [“es2015”, { “modules”: false }] ] } This will disable modules and strict mode, while keeping … Read more

JavaScript function order: why does it matter?

tl;dr If you’re not calling anything until everything loads, you should be fine. Edit: For an overview which also covers some ES6 declarations (let, const): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Scope_Cheatsheet This weird behavior depends on How you define the functions and When you call them. Here’s some examples. bar(); //This won’t throw an error function bar() {} foo(); //This … Read more