Home » JavaScript (page 3)

JavaScript

Beware the performance cost of async_hooks (Node 8)

I was excited about async_hooks having finally landed in Node.js 8, as it would enable me to share important troubleshooting information with all code involved in handling a particular request. However it turned out to have terrible impact of our CPU usage (YMMV):                 This was quite extreme and is likely related to ...

Read More »

JavaScript Array find() Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the Array.find() method. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. Most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, etc. support it. The ...

Read More »

JavaScript Array filter() method Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the Array.filter() method. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. Most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, etc. support it. The ...

Read More »

JavaScript switch Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the switch conditional statement. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. Most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, etc. support it. ...

Read More »

JavaScript Array Methods Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the different array methods in the javascript language. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. Most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft Edge, ...

Read More »

JavaScript String substring() Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the JavaScript string subString() method. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. Most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, etc. support ...

Read More »

JavaScript Array map() Example

Greetings readers, in this tutorial, we will show how to use the JavaScript scripting language and the JavaScript Array map() method. 1. Introduction JavaScript is an object-oriented programming language that allows the client-side scripting to interact with a user and deliver the dynamic pages. It is supported by most web browsers including Google Chrome, Mozilla Firefox, Safari, Internet Explorer, Microsoft ...

Read More »

Understanding ordering with JavaScript async methods

So I challenged someone in a code review to prove that there code that made use of async functions wouldn’t be susceptible to a race condition. To that end I came up with a very trivial code example to demonstrate the issue, worth trying to write down the output and line orderings before you read on. let list; async function ...

Read More »

AngularJS Components Library Example

In this article, we will take a look at developing a custom AngularJS Component. Then, we will learn to package it as a library so that we can reuse it across different projects. Firstly, we will start by getting familiar with the underlying concepts and their implementation leading up to writing our own Component library. Finally, we will consume the ...

Read More »