馃殌 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 馃挭

JS Interview #36: Can you add a new property to the JS array?

Does the new array property affect its length? Is such an assignment valid at all? . . . . . . . . . . . . . . ....

February 10, 2021 路 1 min 路 Coderslang Master

JavaScript setTimeout, how to delay the function execution

By default, all JavaScript code runs synchronously. This means that the statements are evaluated from top to bottom, one after another. console.log('hello'); console.log('synchronous'); console.log('world'); The strings will be printed to the console in the same order as they appear....

February 9, 2021 路 2 min 路 Coderslang Master

What is rimraf and how to use it in Node.js

The rimraf command is an alternative to the Linux command rm -rf. It allows you to do deep recursive deletion of files and folders. Global rimraf installation You can install rimraf globally using npm....

February 8, 2021 路 1 min 路 Coderslang Master

JS Interview #35: What is faster, zero timeout or immediate resolve?

What鈥檚 the order of the output? . . . . . . . . . . . . . . . . . Both setTimeout and Promise.resolve are asynchronous actions, which means that the inner console....

February 7, 2021 路 1 min 路 Coderslang Master

How to disable ESLint for some lines, files or folders

ESLint - is a very convenient tool to control code quality. But, sometimes it鈥檚 necessary to disable it. In this tutorial, you鈥檒l learn how to turn off ESLint for certain directories and files....

February 6, 2021 路 2 min 路 Coderslang Master

4 ways to compare strings in JavaScript

In this short JS tutorial, you鈥檒l learn how to compare strings and see code examples. ...

February 5, 2021 路 2 min 路 Coderslang Master

JS Interview #34: Different ways to get current date in JavaScript

How do you prefer to get the current date in JS? What will be logged to the console? . . . . . . . . . . . ....

February 4, 2021 路 1 min 路 Coderslang Master

How to fix the error `require is not defined` in Node.js

Today I started writing a new project on Node.js and got this error on the very first run: const express = require('express'); ^ ReferenceError: require is not defined at ModuleJob.run (node:internal/modules/esm/module_job:152:23) at async Loader....

February 2, 2021 路 2 min 路 Coderslang Master

JS Interview #33: Add two empty arrays and check the type

Array? Object? Undefined? What鈥檚 the output? . . . . . . . . . . . . . . . . . . In JavaScript, the + operator doesn鈥檛 do the concatenation of arrays....

February 1, 2021 路 1 min 路 Coderslang Master

How to solve JavaScript tasks in a professional IDE with hints

To become a programmer, you need to code. And not on your smartphone or browser, but in a professional Interactive Development Environment (IDE). One of the best features of CoderslangJS - is practical tasks with automatic verification....

January 31, 2021 路 2 min 路 Coderslang Master