Coderslang: Become a Software Engineer

  • Hey there 👋. If you want to learn to code, you’re in the right place.
  • To start learning from scratch I suggest the Full Stack JavaScript course
  • To improve your skills and prepare for the tech interview - a mobile app for iOS or Android
  • Below, you’ll find the links to contact me. And further, a list of interesting programming notes/articles. Feel free to send me a short message on Twitter, Telegram or a plain old email.
  • If you like to get a weekly newsletter with the latest programming tips and tricks, you can subscribe to it here. And get free programming ebooks.
  • Let’s go 🚀 !

How to transform a JS array with "map"

In this tutorial you’ll learn how you can use the function map to transform the JavaScript array by applying a mapping function to all of its elements. The biggest drawback of the forEach loop is that it doesn’t return anything useful....

May 20, 2022 · 2 min · Coderslang Master

How to reduce a JavaScript array to a single value

The reduce function is the most complex of the standard JavaScript array functions. With reduce, you can compress (reduce) an array to one element. For the reduce function to work properly, you’ll need 2 parameters — the reducer function and the initial value....

May 19, 2022 · 4 min · Coderslang Master

How to filter out array elements in JS

The built-in array function filter will help you filter out the unwanted elements from the array and return a new array consisting only of suitable items. To work correctly, the filter function accepts a parameter called “filtering function” or “filtering predicate”....

May 18, 2022 · 2 min · Coderslang Master

How to iterate over the array in JavaScript with forEach

Iterating over the elements of the array in JavaScript is a very common task. In this tutorial you’ll learn how to use the built-in array function forEach to go over all array elements....

May 17, 2022 · 2 min · Coderslang Master

What is the --save option for npm install

The --save option for npm install or npm i allows you to add the npm module you’re installing to the file package.json. This way it’ll become one of the project dependencies and will be automatically installed the next time you run npm install....

May 9, 2022 · 1 min · Coderslang Master

What is the difference between ~ and ^ in package.json?

Node package manager supports semantic versioning. To take full advantage of it, you can use the symbols tilde(~) or caret(^). Tilde(~) means approximately equivalent to version. "moment": "~2.29.1" In this example npm install will pick up the latest release of the module moment starting from 2....

February 19, 2022 · 1 min · Coderslang Master

Check for an empty value in JavaScript

When I started learning JS, one of the most powerful tools I discovered, was the ability to check if a variable is empty. My definition of emptiness was hardly a scientific one as I didn’t mean to check if it was defined or not....

February 8, 2022 · 1 min · Coderslang Master

Get random integer in a range using JavaScript

Similarly to generating a random float number within the specific range, you can write a function to get a random integer with a range. function getRandomIntegerInRange(min, max) { return Math.floor(Math.random() * (Math....

February 7, 2022 · 1 min · Coderslang Master

How to prepend a value to the beginning of a JS array

To add a new value to the beginning of the JS array, you can use the function Array.unshift. Here’s how it works. ...

February 6, 2022 · 1 min · Coderslang Master

Loose equality in JavaScript

Loose equality in JS in a powerful tool that allows you to loosely compare different values. If the types of the values don’t match, JavaScript will do a typecast (most often to a string type) and then do the comparison....

February 5, 2022 · 1 min · Coderslang Master