Learn JavaScript. Lesson 2. Text Output and Comments

This is the second article of the series “Learn JavaScript” aimed at helping you with your first steps in the JavaScript world. Last time, you learned how to prepare your JavaScript workspace by installing Visual Studio Code and Node....

September 2, 2022 · 3 min · Coderslang Master

Learn JavaScript. Lesson 1. Getting Started

There are various approaches to learning JavaScript. One of the most common approaches is to start with HTML in a playground that runs in your browser. The upside is that it’s very easy to get started, but the downside is that when you get to actually learning JavaScript you’ve lost your motivation, and you can’t move to the next level....

September 1, 2022 · 1 min · Coderslang Master

How to capitalize each word in a string with CSS

When you’re working with CSS, there’s nothing easier than capitalizing each letter in string using the text-transform CSS property. To be fair, it’s way easier than capitalizing a string with Javascript....

August 14, 2022 · 1 min · Coderslang Master

How to run JavaScript code

Not all JavaScript programs are the same as you can use JS for backend, frontend and mobile development. Running JavaScript code depends on what kind of code it is. Frontend JS If you’re looking to run the JavaScript code that manipulates the DOM (document object model) and works within the context of the web page, then the best way to “run it”, would be to link the JS script to the HTML document and open this HTML in the browser....

August 13, 2022 · 2 min · Coderslang Master

What is the += operator in JavaScript

The addition assignment or the += operator does the addition and assignment in a single operation. To learn how it works, let’s first try to separate the assignment and the increment....

August 7, 2022 · 1 min · Coderslang Master

How to exit from a JavaScript function

You can exit from any JS function using the return keyword. It can be placed anywhere in your code. const exampleFunction = () => { console.log('hello'); return; console.log('world'); console.log('!'); } The example above is quite artificial, but it demonstrates how return works very well....

August 6, 2022 · 1 min · Coderslang Master

How to properly clear a timeout in JavaScript

A timeout in JavaScript is a useful tool to asynchronously delay the execution of the function. It requires 2 arguments: the function that you’d like to set for the async execution, and the delay after which the function will be called. ...

August 5, 2022 · 2 min · Coderslang Master

How to capitalize first letter of every word with JavaScript

In this tutorial you’ll learn how to change the first letter of every word to upper case using JavaScript. Capitalizing with split, for loop and join If you’re just getting started with JavaScript, then I suggest the most obvious step-by step approach to capitalizing each word in string....

August 4, 2022 · 2 min · Coderslang Master

How to check the latest version of the npm package

If you’re looking to find out what’s the latest version of a certain package, you can quickly check this information right in your terminal with the command npm view. Here’s how you can check the latest version of express:...

August 3, 2022 · 1 min · Coderslang Master

How to find the version of any installed npm package

In this short tutorial you’ll learn how to check the version of any installed npm package including the ones that have been installed globally using the -g flag. Locally installed packages To check the current versions of the npm packages for your project, you should navigate to the project directory where your package....

August 2, 2022 · 1 min · Coderslang Master