Introduction to JavaScript

In the JavaScript tutorial, we will learn about JavaScript basics, which is scripting and lightweight interpreted programming language it helps to create dynamic web pages. Basically, It facilitates the development of excellent front-end and back-end applications using JavaScript-based frameworks such as jQuery, Node.JS, and others. Note: HTML and CSS give your page structure and style, while JavaScript … Read more

JavaScript Syntax

JavaScript syntax is the set of rules that define a correctly structured JavaScript program. JavaScript consists of JavaScript statements that are placed within the <script> </script> HTML tags in a web page, or within the external JavaScript file having .js extension. JavaScript Syntax- Attributes JavaScript has two following attributes: JavaScript Syntax – Values JavaScript syntax can be defined by … Read more

jQuery Ajax Form Submit with FormData Example

jQuery Ajax submit multipart form or FormData; In this tutorila, you will learn how to submit the form using the jquery ajax with multi-part data or FromData. In this tutorial, learn jquery ajax form submits with the form data step by step. A simple jQuery Ajax example to show you how to submit a multipart … Read more

JavaScript String indexOf(): Find Occurrence Position in String

In this tutorial, you will learn how to find the first occurrence of a character’s position in a string using the JavaScript string indexOf() method. The indexOf() method in JavaScript is used to find the first occurrence of a character in a given string. It returns the position of the first occurrence of the character … Read more

JavaScript Date Formats

Date objects represent a single moment in time in a platform-independent format. There are commonly 3 types of input JavaScript date formats: JavaScript Date Formats – Time Zones JavaScript will use the browser’s time zone when we set a date, without specifying the time zone. Short Dates The “MM/DD/YYYY” syntax is used for short dates: … Read more

Get Current Page URL, Path, Host and hash using jQuery

Get current Page URL, Path, and hash using jQuery; In this tutorial, you will learn how to get the current page URL, pathname, hostname, origin using the jQuery. Let’s start the tutorial to find the current page URL and find the pathname, hostname, origin from the current page URL using jQuery with example. How to … Read more

JavaScript Reserved Words

JavaScript Reserved words have special meaning and can not be used in your code as variables, function names, or loop labels. It is important to note that JavaScript is a case-sensitive language (whereas HTML is not case-sensitive). JavaScript Reserved words Here is a list of JavaScript reserved words (and words to avoid) in JavaScript: abstract … Read more

JavaScript Array Const

JavaScript const keyword was introduced in 2015.  JavaScript array const is used very commonly. The arrays that are declared with const keyword cannot be reassigned: The  const  keyword mislead a little bit because it is not used to define a constant array. It is used to define an array constant reference. Because of this feature, … Read more

JavaScript Const

The JavaScript const variable is also used to declare a variable like var. But we cannot redeclare const in the whole program. The const keyword was introduced in ES6. The JavaScript const variables should be assigned the value at the time of declaration. The JavaScript const should be used when we declare There is a … Read more

JavaScript Sorting Arrays

In JavaScript sorting arrays can be done in many ways. These ways are mentioned below: Sorting an Array The sort() the method is used to sort array elements in place. It changes the element’s place in the original array: Output: Reversing an Array The reverse() the method is used to reverse the elements in an array. To sort arrays … Read more