Book Your Free Call
Tim Mouskhelichvili • March 7, 2022 • 2 minutes to read
Summary TypeScript just like JavaScript has a special typeof operator. In TypeScript, the typeof operator is used to refer to the type of a variable in a type context. const v = 'This is a string'; const data: typeof [...]
Tim Mouskhelichvili • March 7, 2022 • 3 minutes to read
In JavaScript, there is a lot of different ways to capitalize the first letter of a string. You can capitalize the first letter with a combination of built-in javascript functions, with regex expressions and, even with CSS. Read this [...]
Tim Mouskhelichvili • March 7, 2022 • 5 minutes to read
In JavaScript, the slice() function is part of both the Array and the String prototype. This function is used to select items or characters based on the provided indices. In this article, you will find all the information needed [...]
Tim Mouskhelichvili • March 7, 2022 • 3 minutes to read
To get the time in JavaScript, you will need to work with the built-in Date object. The Date object represents a moment in time in a platform-independent manner and has a lot of helper functions that will help the [...]
Tim Mouskhelichvili • March 7, 2022 • 2 minutes to read
When it comes to rounding a number to two decimal places in JavaScript, a developer has a lot of options. It can be done with: The toFixed() function.The Math.round() function.A helper function.The lodash round() function [...]
Tim Mouskhelichvili • March 7, 2022 • 3 minutes to read
In JavaScript, you have a lot of options when it comes to the concatenation of strings. You can use: The + operator.Template literals.The built-in concat() function of String.The built-in join() function of Array. In this article [...]
Tim Mouskhelichvili • March 7, 2022 • 2 minutes to read
In JavaScript, to make a string uppercase, the easiest way to do it is by using the toUpperCase() built-in function. This function is easy to master (even for a beginner), and you will become a pro of using it [...]
Tim Mouskhelichvili • March 7, 2022 • 4 minutes to read
In JavaScript, to extract part of a string, you need to use the substring() function, or one of its alternatives. You may know the substring() function, but do you know everything about it? In this article, you will find [...]
Tim Mouskhelichvili • March 7, 2022 • 4 minutes to read
In JavaScript, the easiest way to check if a string starts with something is to use the startsWith() function. This article will tell you everything that you need to know about this function. By the end of this guide [...]
Tim Mouskhelichvili • March 7, 2022 • 2 minutes to read
There is a lot of use cases where you would want to pause your JavaScript's execution before running the next line. Sadly, a function like that is absent from JavaScript's default functionality. Luckily for us, JavaScript provides a few [...]