Welcome to my blog !

Top 10 ways to get the first element from an array in javascript with example

January 1, 2022 ·  3 min read

It is a short tutorial on multiple ways to get the first element from an array. Let’s declare an array. let array=[12,1,8,9]; Array index always starts with index=0 and array.length returns the length of an array. that means array[0] returns first element, array[array.length-1] returns last element of an array. Array.length property returns length of an array. Following are Multiple ways, we can retrieve the first element of an array in JavaScript....

Top 10 ls command examples with tutorials in Linux/Unix

January 1, 2022 ·  3 min read

Ls is one of the frequently used commands in Linux as well as UNIX and it is important to know about this command Ls command list the names of files or directories in a directory. ls command sort the files alphabetically and output to the standard console. when the ls command is executed, the Linux server does inode sorting and outputs the files alphabetically in Linux, files metadata is stored in a data structure that includes file owner, file access rights, and file type....

Top 10 gzip examples in linux or unix

January 1, 2022 ·  3 min read

Gzip is abbreviated as GUN zip and it is one of the frequent commands used in Linux. gzip command is used to compress a file for reducing the size of the file. This will save bandwidth if the file is transferring between different systems. Moreover, the reduced size depends on the content of the file, if the content is text, it will reduce 60% and for the image, it should be 80%....

The best way to convert Array to JSON in typescript with example

January 1, 2022 ·  3 min read

Casting Array and JSON introduction The frontend will interact with the Database in Typescript apps like Angular using REST API. REST API is a separate application that communicates with a database and can be created in any language. The REST API accepts JSON as input and returns JSON as output. Angular applications which are based on MVC pattern take the input from the View layer and store/holds them in an array of objects as a model in a Controller....

String interpolation in Angular | String.format in typescript

January 1, 2022 ·  1 min read

In this tutorial, You will learn the string format function in typescript. In this example, how to implement string interpolation in typescript. It uses to replace placeholders in a string template. In javascript, there is no format function in a string object The same is not available natively in typescript There are multiple ways to replace placeholder strings in typescript ES6 template string strings ES6 introduced template strings to replace placeholder values in a string....

You'll get a notification every time a post gets published here.