Open in app

Sign In

Write

Sign In

PaperInFlames
PaperInFlames

23 Followers

Home

About

Mar 15

Sort Array of Strings in JavaScript

Here I’m sharing three ways to sort an array of strings in JS. Approach 1: We can directly use the inbuilt methods of array objects in JS. If we want to sort in ascending order we can simply use the Sort method and Reverse method for descending order. For example…

Array Of String

2 min read

Array Of String

2 min read


Feb 27

Optimize complex if-else statements in JavaScript

Sometimes we have to write complex if-else statements to verify multiple conditions. For e.g., I have a function that returns the discount price based on the coupon code provided by the user. Here have to verify each and every statement which takes a long time. Approach 1 : The first way to optimize this issue is by using a switch case. In which we don’t need to verify each and every statement. Instead based on the coupon code we can directly jump to the respective condition.

Nested If Else

2 min read

Optimize complex if-else statements in JavaScript
Optimize complex if-else statements in JavaScript
Nested If Else

2 min read


Feb 3

How to improve the unit test running time in Angular

What is Unit Testing in Angular? Unit testing in Angular refers to the practice of testing individual components, services, pipes, and other units of an Angular application in isolation from the rest of the application. …

Unit Testing

3 min read

How to improve the unit test running time in Angular
How to improve the unit test running time in Angular
Unit Testing

3 min read


Jun 23, 2022

How to automate running of Apache and MySQL in XAMPP

1. Open notepad and enter the below commands start C:\xampp\xampp-control.exe 2. Save as .bat file 3. Open your XAMPP application, click on ‘config’ button. 4. Check the check boxes of required servers.

Xampp

1 min read

How to automate running of Apache and MySQL in XAMPP
How to automate running of Apache and MySQL in XAMPP
Xampp

1 min read


Jun 2, 2022

Maintain history of copied text and save your time in copy-pasting.

If you are working projects, where you’ve copy paste couple of text multiple times, here is the hack. How to Save the copied text (Ctrl + C): 1. Click on Windows key in keyboard. 2. Search for Clipboard Settings or you can also find this under System > Clipboard in settings. 3. Toggle the `on` button of the Clipboard history.

Copypaste

2 min read

Maintain history of copied text and save your time in copy-pasting.
Maintain history of copied text and save your time in copy-pasting.
Copypaste

2 min read


May 28, 2022

Add key-value pair to every object in array of objects in JavaScript

Sometimes, we’ve to add flag or some new key-value pair to every object in array of objects. For that we can follow three ways to achieve it. For suppose, we have an array of objects as below and we want to add gender key to all the objects. students =…

Key Value Pair

2 min read

Add key-value pair to every object in array of objects in JavaScript
Add key-value pair to every object in array of objects in JavaScript
Key Value Pair

2 min read


May 20, 2022

Avoiding multiple API calls in Angular by using shareReplay method of RxJS

While working with some Angular projects, we’ve to subscribe the same API in to different methods in a component. In order to avoid that we can use shareReplay method of RxJS. Lets consider an app which has two buttons and two different methods gets called on clicking on those buttons…

Ngrx

3 min read

Avoiding multiple API calls in Angular by using shareReplay method of RxJS
Avoiding multiple API calls in Angular by using shareReplay method of RxJS
Ngrx

3 min read


May 17, 2022

Extract list of values from an array of objects to an array based on a key in JavaScript.

There may be a situation where you want to extract the list of values of a specific key from an objects to an array. Method 1: In one way, we can use both for loop and Array.push() method and achieve it. For example, we have an Array of objects as…

Array Of Object

2 min read

Extract list of values from an array of objects to an array based on a key in JavaScript.
Extract list of values from an array of objects to an array based on a key in JavaScript.
Array Of Object

2 min read


Mar 17, 2021

Angular Interview Questions

If you are here reading this post, you might be preparing for interviews. I hope that I’ll jot down the most frequently asked interview question and answers for both Freshers and Experienced as of 2021. Hope this article will help you in cracking your dream job. What is Angular? Angular…

Angular

4 min read

Angular Interview Questions
Angular Interview Questions
Angular

4 min read

PaperInFlames

PaperInFlames

23 Followers

Artist and Writer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech