Creating a Vue Application and run it.

Install latest version of Node.js. Run the following command in your command line. Then type Project name and Package name Select Yes/No Type following in command line. The dev server will be started. Paste ‘http://localhost:5174/’ on browser. Vue app is created.

Swal – Confirmation

The “SweetAlert” library, often referred to as “swal,” to create a custom and interactive alert modal with customized buttons, text, and icons. The modal is typically used for user confirmation or information display in a more visually appealing way than the browser’s default alert. .then((willDelete) => { … }): This is a callback that is… Continue reading Swal – Confirmation

Clear Selection Dropdown

To make a selection from the dropdown to from select field, jQuery provides and option for this This part of the code is a jQuery method that sets the selectedIndex property of the selected <select> element to 0. The selectedIndex property determines which option is selected in the dropdown list. By setting it to 0,… Continue reading Clear Selection Dropdown

Published
Categorized as JavaScript

Nested Object Loop

IF you want to find the value for some specific key which is a nested object, like shown below, if we want to get “custcol_ag_bankname” object value from this we can use the code shown below

Published
Categorized as JavaScript

4 JavaScript Features in ES2023 That You Should Know

1. Array.findLast() and Array.findLastIndex() First up is the “Array find from last” feature, proposed by Wenlu Wang. It introduces two new methods for Array and TypedArray objects: findLast() and findLastIndex(). These methods function similarly to their existing counterparts (find() and findIndex()), but, as the names suggest, they start searching from the end of the array rather than the beginning. This… Continue reading 4 JavaScript Features in ES2023 That You Should Know

8 JavaScript Features in ES2019 That You Should Know

1. Array.prototype.{flat,flatMap} Array.prototype.flat() proposed to flatten arrays recursively up to the specified depth and returns a new array. Syntax: Array.prototype.flat(depth)depth — Default value 1, Use Infinity to flatten all nested arrays. Array.prototype.flatMap() maps each element using a mapping function and flattens the result into a new array. It’s identical to the map operation followed by a flat of depth 1. Syntax: Array.prototype.flatMap(callback)callback: function that produces an element of the new Array.… Continue reading 8 JavaScript Features in ES2019 That You Should Know

7 New JavaScript Features in ES2022 That You Should Know

1. RegExp match indices By using regular expressions, we can search for patterns in strings. Regexp.exec and String.matchAll are two methods used in JavaScript to retrieve a list of matches. Both return the matched substrings; the initial input string; the index in the input where the match was found; and the group’s object, consisting of substrings for any named… Continue reading 7 New JavaScript Features in ES2022 That You Should Know

10 New JavaScript Features in ES2020 That You Should Know

#1: BigInt BigInt, one of the most anticipated features in JavaScript, is finally here. It actually allows developers to have much greater integer representation in their JS code for data processing for data handling. At the moment the maximum number you can store as an integer in JavaScript is pow(2, 53) – 1 . But BigInt actually… Continue reading 10 New JavaScript Features in ES2020 That You Should Know