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

JavaScript, calculate a square root using Math.sqrt()

To calculate the square root of the number in JavaScript, you can use the function Math.sqrt(). You pass in a number, and it returns the square root of this number....

February 15, 2021 路 1 min 路 Coderslang Master

JavaScript, remove last character from a string

JavaScript strings are immutable. This means that once the string was created it can鈥檛 be changed. When you need to remove the last character from a string in JavaScript, you should create a new string without this character....

February 14, 2021 路 2 min 路 Coderslang Master

How to use Promise chains in JavaScript

Asynchronous programming in JavaScript in unimaginable without Promises and Promise chains. In this tutorial you鈥檒l learn how to create JavaScript Promises, how to handle promise chains and utilise the functions Promise.all and Promise.race. ...

May 7, 2022 路 5 min 路 Coderslang Master

JS Interview #37: What is the type of a single argument provided to the split function?

What鈥檚 the output? . . . . . . . . . . . . . . . . . . In this code snipped, all the arguments provided to the function split will be collected and placed in a single array args....

February 13, 2021 路 1 min 路 Coderslang Master

140 HTML colors with HEX, RGB codes and names

With so many colors to choose from, it can be tough to decide which one to use for your website or blog. But with a little help from this list of 140 HTML colors, you can find the perfect color for your next project....

February 12, 2021 路 7 min 路 Coderslang Master

JavaScript, asynchronous programming and Promise

In this tutorial, you鈥檒l learn what are the promises in JS, which states can the JavaScript Promise be in and how to handle asynchronous errors in JS promises. ...

February 11, 2021 路 4 min 路 Coderslang Master

JavaScript setInterval, how to schedule repeated execution with the delay

Similarly to setTimeout, that executes the callback function once, you can start the repeated execution of the function in JavaScript using setInterval. Starting setInterval timer In JS, setInterval has the same params as setTimeout....

February 10, 2021 路 2 min 路 Coderslang Master

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