JavaScript Tutorial

How To Use Babel To Fix ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’

When I run the command browserify ./js/test1.js -o build.js in the terminal to bundle some js files into one, it throws the error message like ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’. This article will tell you how to fix it using babel to transcompile the js file source code to ES […]

How To Use Babel To Fix ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’ Read More »

How To Implement Sprite Sheet Animation Using Javascript & Pure CSS

When your JavaScript application needs a lot of images, you may find it will cost so much time to download all those images. Downloading each image will create an HTTP request to your web server, and this will reduce your server performance very much for large HTTP requests. This example will tell you how to

How To Implement Sprite Sheet Animation Using Javascript & Pure CSS Read More »