Welcome to my blog !

Multiple ways to create an array with random values in javascript

August 10, 2022 ·  2 min read

It is a short tutorial with examples of creating an array of random numbers. It also includes duplicate numbers and examples to get Random values from the javascript array. Sometimes, We want to generate a fixed array with random values for testing and debugging. javascript Random values generate an array In this example, We will see how to create a random array with the size of 10 using ES6 Math....

Learn SweetAlert library tutorials with examples

August 10, 2022 ·  3 min read

SweetAlert2 javascript library Javascript has inbuilt into the alert mechanism. which can be called using a window.alert() method. This just displays the basics alert popup . The disadvantage with this is the look and feel are not great. UI is the same across mobile and desktop devices. There is no way we can customize the alerts. Alerts are usually to notify the users with a popup with error/warning messages. We don’t have the option to customize to take input from the user with this approach....

jsdoc Javascript documentation tutorials with examples

August 10, 2022 ·  2 min read

In my previous post, we learned javascript documentation framework - JSDOC tutorials, In this post, We are going to learn JSdoc function tags with examples. function documentation Any function can be declared with function name return types and accepted input types. @param tag provides parameters for a javascript function. This includes parameter type in open and close braces and Description of a parameter Types of the accepted parameter are string Object or namespace pointed to code....

How to retrieve x and y positions of html div elements javascript

August 10, 2022 ·  2 min read

How do get x and y-axis positions for any HTML element in javascript? Sometimes, We want to get x and y-axis coordinates for a given HTML element such as Div and img. How to get x and y positions of HTML div element Javascript provides DOM API to access the object. getBoundingClientRect() in javascript returns size of an element and position related to view port. Here is a Syntax DOMRect obj=object....

How to get the title of HTML webpage in javascript?

August 10, 2022 ·  2 min read

In this tutorial, learn how to get the current web HTML page title in javascript. And also how to update page title with value in javascript. On the Html page, the Title tag contains a text content of a complete web page. <title> tag in HTML contains text content. Here is a title example in HTML how to get the Current page title in javascript? There are several ways to get the current page title in javascript....

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