Algobook
- The developer's handbook
mode-switch
back-button

Articles about JavaScript

All articles and blogposts about JavaScript. We hope you find what you are looking for and that you will learn something new.
Search for articlesType in keywords or title of the article you are looking for
Binary trees JavaScript-thumbnailBinary trees JavaScriptGuide and implementation of binary trees in JavaScript with functions for inserting nodes, deleting and print the tree and nodes.
Sat Aug 12 2023
Event loop in JavaScript-thumbnailEvent loop in JavaScriptArticle about the event loop in JavaScript. In depth guide on how it works, and why it exists.
Wed Aug 09 2023
Binary conversion in JavaScript-thumbnailBinary conversion in JavaScriptTutorial on how to convert binary nunmber to decimal and decimal to binary number
Sun Jul 09 2023
How to use interceptors with axios in JavaScript-thumbnailHow to use interceptors with axios in JavaScriptTutorial on how to use interceptors with axios in JavaScript. Interceptors are great when we want to apply common request configs in one place and not duplicate the code.
Thu Jul 06 2023
Currying in JavaScript-thumbnailCurrying in JavaScriptArticle about currying in JavaScript. Examples and explanations about the concept.
Sun Jun 25 2023
How to convert fraction to percentage in JavaScript-thumbnailHow to convert fraction to percentage in JavaScriptQuick tutorial on how to convert fractions to percentage in JavaScript
Tue Jun 06 2023
Convert shoe sizes in JavaScript-thumbnailConvert shoe sizes in JavaScriptA tutorial on how we can convert shoe sizes in JavaScript. We will transform millimeter or inches to EU/US/UK sizes
Mon Jun 05 2023
How to create a quit smoking calculator in JavaScript-thumbnailHow to create a quit smoking calculator in JavaScriptA short tutorial on how we can create a calculator for why people should stop smoking. We will calculate the total cost per year, smokes per year and also how much money that can be saved
Mon Jun 05 2023
New Array.prototype functions in JavaScript 2023-thumbnailNew Array.prototype functions in JavaScript 2023A guide on new functions in arrays in JavaScript. We will take a look at toReversed, toSpliced, toSorted, with, findLastIndex and findLast.
Sat Jun 03 2023
How to use an imported image as file in form data in Javascript-thumbnailHow to use an imported image as file in form data in JavascriptA short tutorial on how we can use an imported image file as a blob in our form data to post to our API.
Fri Jun 02 2023
Converting time in JavaScript-thumbnailConverting time in JavaScriptToday we will learn how we can convert time in JavaScript. We will work with seconds, minutes and hours.
Wed May 24 2023
Converting length in JavaScript-thumbnailConverting length in JavaScriptIn this guide, we will convert some length units in JavaScript. We will cover both the metric and the imperial systems.
Wed May 24 2023
Callbacks in JavaScript - explanation and examples-thumbnailCallbacks in JavaScript - explanation and examplesWhat is a callback function? How does it work? In this tutorial, we will explain and show some examples in JavaScript.
Wed May 24 2023
How to build your JavaScript to a public lib on npmjs.com-thumbnailHow to build your JavaScript to a public lib on npmjs.comA complete guide on how we can create a library in JavaScript and transpile it to production ready code and publish to npmjs.com. We will cover how to set babel up, package.json and also make it support TypeScript.
Mon May 22 2023
How to time our code execution in JavaScript-thumbnailHow to time our code execution in JavaScriptA short guide on how we can time our code execution with the built in function in JavaScript, console.time and console.timeEnd
Tue May 16 2023
Async await vs Promise in JavaScript-thumbnailAsync await vs Promise in JavaScriptAn article on the difference between async await and promise in JavaScript. We will show examples of both in real life scenarios.
Mon May 15 2023
Check if a word is a palindrome in JavaScript-thumbnailCheck if a word is a palindrome in JavaScriptIn this short tutorial, we will check if a word is a palindrome. We will solve it using plain JavaScript.
Sun May 14 2023
Function for reversing a string in JavaScript-thumbnailFunction for reversing a string in JavaScriptA short guide on how we can create a function for reversing a string in JavaScript
Sun May 14 2023
Check if two dates are on the same day in JavaScript-thumbnailCheck if two dates are on the same day in JavaScriptTutorial of how we can check if two dates are on the same day, or if it is tomorrow, in plain JavaScript without any external libs.
Sat May 13 2023
How to flatten an array in JavaScript-thumbnailHow to flatten an array in JavaScriptAn article on how we can flatten arrays in JavaScript. We will show both arrays with just numbers but also arrays of objects. We will use Array.prototype.flat() in this guide.
Fri May 12 2023
How to programatically format JSON in JavaScript-thumbnailHow to programatically format JSON in JavaScriptA short guide on how we can programatically format a JSON object in JavaScript to beautify our output.
Thu May 11 2023
How to work with rest and spread operations in JavaScript-thumbnailHow to work with rest and spread operations in JavaScriptA short guide on how rest and spread operators work in JavaScript.
Tue May 09 2023
How to copy to clipboard in JavaScript-thumbnailHow to copy to clipboard in JavaScriptA short guide on how we copy text to the clipboard in JavaScript.
Sun May 07 2023
How to calculate the percentage of a number in JavaScript-thumbnailHow to calculate the percentage of a number in JavaScriptIn this guide, we will briefly show how we can calculate the percentage of a number in JavaScipt.
Tue May 02 2023
Array.reduce() function in JavaScript-thumbnailArray.reduce() function in JavaScriptIn this guide, we will show some examples of how we can use Array.reduce function in JavaScript. We will do some total sum of a particular value and finding the smallest and highest number in an array of objects. Enjoy!
Tue Apr 25 2023
Speed conversion in JavaScript-thumbnailSpeed conversion in JavaScriptIn this post, we will do some speed conversion in JavaScript. We will convert between mp/h to km/h, m/s to mp/h and so on. Follow along to learn more about speed conversion!
Sat Apr 22 2023
How to use Promise.all in JavaScript to speed up your API requests-thumbnailHow to use Promise.all in JavaScript to speed up your API requestsYou're looking for a way to speed up your API calls? You've heard of Promise.all() but don't really know how to use it? In this guide, we will show some cases where we can use it, and how!
Fri Apr 21 2023
Convert Celsius to Farenheit and vice versa in JavaScript-thumbnailConvert Celsius to Farenheit and vice versa in JavaScriptIn this tutorial we will do some conversion. We will first convert Celsius to Farenheit, and then Farenheit to Celsius.
Thu Apr 20 2023
Group objects from an array in JavaScript-thumbnailGroup objects from an array in JavaScriptIn this example, we will show how to group properties and objects from an array into a grouped object in JavaScript.
Mon Apr 10 2023
Get current position of user in JavaScript-thumbnailGet current position of user in JavaScriptWe will show how we can get the current location of a user using the navigator.geolocation API. We will then display the latitude and longitude in a simple React component.
Mon Apr 10 2023
Calculate percentage difference between two numbers in Javascript-thumbnailCalculate percentage difference between two numbers in JavascriptIn this short tutorial, we will create a function for calculating the difference in percentage between two numbers in JavaScript.
Sat Apr 08 2023
How to calculate percentage change between two numbers in Javascript-thumbnailHow to calculate percentage change between two numbers in JavascriptIn this guide, we will create a function for calculating the change in percentage between two numbers in JavaScript.
Sat Apr 08 2023
Harris-Benedict formula in JavaScript - Maintenance calories calculator-thumbnailHarris-Benedict formula in JavaScript - Maintenance calories calculatorAre you a health freak? Are you on a weight journey? Do you have a fitness blog where you want to have a cool calorie calculator but don't know any good formulas? Don't worry, we got you covered!
Fri Apr 07 2023
Roman numerals converter in JavaScript-thumbnailRoman numerals converter in JavaScriptA common problem that an employer might want you to solve, is to convert a number to a roman numeral. In this guide, we will take a look at how we can solve it in JavaScript.
Thu Apr 06 2023
How to remove duplicates in an Array in Javascript-thumbnailHow to remove duplicates in an Array in JavascriptA short demonstration on how to filter out duplicates in an array in JavaScript.
Thu Apr 06 2023
Filter arrays in JavaScript-thumbnailFilter arrays in JavaScriptAre you in need to filter data depending on certain input? For example if you want to quickly filter your data based on a search query? In this guide, we will share some examples of how to use the Array.filter() function.
Wed Apr 05 2023
Sort arrays in JavaScript-thumbnailSort arrays in JavaScriptHaving the ability to sort data depending on a specific value is crucial when it comes to developing any application. In todays post we will take a look at Array.sort() in JavaScript, and show examples of how we can use it. We will do sorting of primitive arrays and also sort arrays of objects.
Tue Apr 04 2023
Map arrays in JavaScript-thumbnailMap arrays in JavaScriptIn todays guide, we will take a look at the function Array.map() and share some good examples how to use it.
Tue Apr 04 2023
Calculating compound growth in JavaScript-thumbnailCalculating compound growth in JavaScriptIn this tutorial, we will create two algorithms for a known scenario in the world of finances. One for calculating compound growth, and one for calculating compound growth with regards to monthly deposits. Enjoy!
Mon Mar 27 2023