JavaScript

Typical gulpfile.js

Typical gulpfile.js

26.05.19
The file is written for Gulp 4. The file is designed to work with styles (SCSS) and JavaScript. All minify and compile sourcemaps for debugging. Third-party scripts and styles are in separate files. const production...
JavaScript Inheritance and Classes

JavaScript Inheritance and Classes

12.05.19
In many programming languages implemented inheritance. And it also exists in JavaScript. First, consider prototype inheritance. We describe the function constructor function Animal(name, weight, color){ this....
JavaScript Countdown Timer

JavaScript Countdown Timer

11.05.19
Often on sites that sell something you can find a countdown timer to a certain date. Such a script is usually required for landing pages and online stores. JS (() => { let finishDate = new Date(2017, 8, 30...
Swipe events on touch devices

Swipe events on touch devices

10.05.19
Every day sensory devices are being introduced into our lives. These devices have specific events, unlike the desktop. One of these events is the swipe. Especially often have to deal with it when developing a mobile ve...
AJAX with native JavaScript

AJAX with native JavaScript

09.05.19
Consider a few examples of working with AJAX with native JavaScript. Functions are written with ECMAScript-2015 syntax The function for the GET method: let ajaxGet = (url, callback) => { let xhr = new XMLHttp...
<<  1 [23 4  >>