Accessing JavaScript array elements- JavaScript arrays are zero-based indexed. In other words, the first element of an array starts at index 0, the second element starts at index 1, and so on. To access an element in an array, you specify an index in the square brackets []: The following shows how to access the elements of […]

Yesterday date in javascript- The setDate() method sets the day of the Date object relative to the beginning of the currently set month.If the dayValue is outside of the range of date values for the month, setDate() will update the Date object accordingly. Use this code to Get yesterday date in javascript-

Get the current date in JavaScript- JavaScript Date objects represent a single moment in time in a platform-independent format. Date objects contain a Number that represents milliseconds since 1 January 1970 UTC. The Date() constructor creates a new Date object with the actual time value. Code Get the current date in JavaScript-

Base URL in JavaScript- You can access the current url quite easily in JavaScript with window.location You have access to the segments of that URL via this locations object. For example:-