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 Numbers

In JavaScript, numbers are implemented in double-precision 64-bit binary format IEEE 754. Numbers are only one type, represent numbers with or without decimals. JavaScript Numbers Exponentiation The very large and very small JavaScript numbers can be written with exponent (e). Output: JavaScript Numbers Format Just like other programming languages, JavaScript does not define different types like … Read more

JavaScript Array Iteration

JavaScript Array iteration methods operate on every array item. Following are some methods that are used for array iteration: Array.filter() method The filter() the method is used to create a new array with array elements based on condition. This example creates a new array from elements with a value larger than 20: Output: In the example above, … 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