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

JS Interview #8: Zero timeout

What if we call `setTimeout` with 0 delay in JavaScript? Which of the messages will be printed first? (think well, then click for the answer and explanation) In JS, `setTimeout(func, delay)` takes a function `func` and delays its execution by `delay` milliseconds....

November 18, 2020 路 1 min 路 Coderslang Master

JS Interview #7: Is this an array?

Let's find out what鈥檚 the deal with JavaScript arrays. Is `array` an array? (think well, then click for the answer and explanation) In line one we create an array and bind it with the array constant....

November 15, 2020 路 1 min 路 Coderslang Master

JS Interview #6: Variable number of arguments in JavaScript

`true` or `false`? That is the question... (think well, then click for the answer and explanation) In JS, all functions have access to the internal arguments array that holds all arguments that were passed into the function....

November 12, 2020 路 1 min 路 Coderslang Master

JS Interview #5: Can you use an arrow function as a getter?

Are there any issues with the `getId` function? What will be logged to the screen? (think well, then click for the answer and explanation) So, getId is an arrow function, thus it doesn鈥檛 have this of its own....

November 9, 2020 路 1 min 路 Coderslang Master

JS Interview #4: try/catch

How will the `try/catch` blocks behave? What will be logged to the console? (think well, then click for the answer and explanation) So, we have 2 variables and 2 try/catch blocks that supposedly catch errors and put them into e1 and e2....

November 6, 2020 路 1 min 路 Coderslang Master

How to test Node.js backend with `supertest`

So, you鈥檝e built your Node.js backend with Express and now you need a clean and reliable approach to test it? In this article, I鈥檒l show you how you can use the supertest module to make testing your Express.js backend feel like a breeze! ...

November 5, 2020 路 2 min 路 Coderslang Master

Built-in String functions in JavaScript

A detailed review of useful JS functions that will help you work with the String data type. ...

November 4, 2020 路 5 min 路 Coderslang Master

JS Interview #3: Adding strings to numbers and booleans

Will we see any output? If yes, then what would it be? (think well, then click for the answer and explanation) To answer this question correctly, you need to understand the typecast rules in JS....

November 3, 2020 路 1 min 路 Coderslang Master

JS Interview #2: How to create an array in JavaScript

What's the correct way to create an array in JS? (think well, then click for the answer and explanation) The first array, a1 is declared using an empty array literal....

October 31, 2020 路 1 min 路 Coderslang Master

JS Interview #1: Type conversion in JavaScript

What's going to be printed to the console? (think well, then click for the answer and explanation) In the first line, we define the variable `str` and initialize it as a string with the value `1`....

October 29, 2020 路 1 min 路 Coderslang Master