Welcome to my blog !


Top 10 ways to get last element from an array in javascript

May 12, 2021 ·  3 min read

This is an short tutorial on multiple ways to get 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 first element of an array in JavaScript For givn input array above, Outut is first element from an array is 9....

Top 5 ways to get last element from an array in javascript

May 11, 2021 ·  2 min read

This is an short tutorial on multiple ways to get last element from an array Let’s declare an example for an array let array=[12,1,8,9]; Arrays in any programming language always starts with index=0, 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 last element of an array in JavaScript Above code, last element from an array is 9....

Image width and height in Nodejs| image-size npm library

May 11, 2021 ·  2 min read

In my previous tutorials, Discussed about how to get image width and height in JavaScript Image size width and height in javascript In this tutorial, we are going to discuss about how to get Image size in Nodejs application. In Nodejs, We have different ways we can get image size using npm libraries and Inbuilt API’s This tutorials talks about image-size npm library with example This library supports all images of different types - PNG,BMP, ICO, SVG and JPEG...

Guide to manifest.json file | Web App Manifest example tutorials

May 10, 2021 ·  3 min read

In this blog post, We are going to learn web app manifest - manifest.json file example with tutorials. You can check my other post on nodejs Check Nodejs v8 engine version web app manifest - manifest.json file  A web app manifest is a JSON file that includes a web application’s metadata. It tells the browser how the user interface should look when the application is installed on a mobile or desktop device....

5 ways to get Image width and height javascript examples

May 7, 2021 ·  3 min read

Image contains width and height based on resolution. Some times we need to find the width and height of an image using javascript and jquery. Images are of different types png, JPEG and SVG. This post covers how to find the image height and width in Javascript,Jquery and Nodejs Using Jquery Selectors Plain Javascript Plain JavaScript to get height and width of an image In Plain javascript, Two ways we can get height and width of an image...