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

How to Filter an Array in JavaScript

All JavaScript arrays have a built-in function .filter that allows you to filter certain elements and return a new array. To filter a JavaScript array, you need to write a function that will determine the filtering rule....

May 18, 2021 路 1 min 路 Coderslang Master

How to concatenate JavaScript array using join

JavaScript join function is built in to every JS Array. It鈥檚 very useful to join the elements of the JavaScript array and convert it into a string. Here鈥檚 the basic syntax:...

May 17, 2021 路 1 min 路 Coderslang Master

How to destructure an array in JavaScript

JavaScript provides a very handy possibility to destructure any array and give custom names to the variables in it. Let鈥檚 assume we start with a simple array of numbers: const numbers = [1, 2, 3, 4, 5]; To get the first 2 elements from this array, we can use the destructuring assignment....

May 15, 2021 路 1 min 路 Coderslang Master

How to wait for all Promises to resolve in JavaScript

So you have a bunch of Promises, and you want to proceed only when all of them are resolved. In JavaScript there are 2 main approaches to solving this. ...

May 14, 2021 路 2 min 路 Coderslang Master

What is TypeScript and why should you use it?

What is TypeScript? TypeScript is a programming language developed and maintained by Microsoft. It introduces additional features like strict type binding (variables are bound to specific data types) to JavaScript and can also be compiled down to JavaScript as well....

May 13, 2021 路 6 min 路 Coderslang Master

JavaScript Interview Question #50: How does Intl.Collator work in JS

What is Intl.Collator and how does it work in JS? What鈥檚 the difference between two sorts? What will be logged to the console? . . . . . . ....

March 24, 2021 路 2 min 路 Coderslang Master

JavaScript Interview Question #49: Add a new array element by index

Will the length of the JS array change? What鈥檚 the output? . . . . . . . . . . . . . . . . . All JavaScript arrays have the push function....

March 21, 2021 路 1 min 路 Coderslang Master

JavaScript Interview Question #48: Dog-sized Cat. JS Object Properties

How many errors are in this code snippet? What鈥檚 the output? . . . . . . . . . . . . . . . . . In JavaScript there are two ways to get access to the object properties....

March 18, 2021 路 1 min 路 Coderslang Master

JavaScript Interview Question #47: How Object.setPrototypeOf works in JS

What is Object.setPrototypeOf in JavaScript? How does it work? What鈥檚 the output? . . . . . . . . . . . . . . . . . Theory The function Object....

March 15, 2021 路 2 min 路 Coderslang Master

JavaScript Interview Question #46: length of JS functions

What鈥檚 the value of the length field for JavaScript functions? What will be logged to the console? . . . . . . . . . . . . ....

March 12, 2021 路 1 min 路 Coderslang Master