Tag: JavaScript

Home » Posts Tagged "JavaScript" (Page 3)
JS ES2022

New features in ES2022 JavaScript

Check out the features incorporated and usable in our JavaScript projects in the ES2022 version of ECMAScript, released this year. Features of ES2022 Top-level await Private instance fields, methods, and accessors Static class fields and methods Static class initialization blocks Error: .cause Array, String, and TypedArray: .at() Method Object: .hasOwn() RegExp: match .indices (‘d’ flag)…

Read More

Factory Functions in JavaScript

Factory functions in JavaScript returns an object that can be reused for making multiple instances of the same object. It can additionally accept arguments permitting you to customize the returned object. JavaScript factory functions have the same functionality that a class function or a constructor has, but instead of using the “new” keyword while creating an object…

Read More

JS ES2021

New features in ES2021 JavaScript

Features of ES2021 replaceAll() Promise.any &&=, ||= and ??= Numeric separators   String replaceAll() Method JavaScript string has a replace() method. It can be used to replace a string with another string. const txt = “The quick brown fox jumps over the lazy dog. If the dog reacted, was it really lazy?”; const newTxt = txt.replace(‘dog’, ‘monkey’); console.log(newTxt);…

Read More

Using AJAX in WordPress

What is AJAX? AJAX is a combination of HTML, CSS and JavaScript/jQuery code that enables to send data to a script, next to receive it and process the response without reloading the page. How AJAX works in WordPress? WordPress Ajax acts as a special Ajax dedicated WordPress action and is capable of handling the server…

Read More