JavaScript

JavaScript

Follow
Follow
homeCSSBootstrapmembers

Importance of using Getters in Vanilla JavaScript

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
Oct 18, 20232 min read

Let's look at an example of why getters (and so are also setters) are so useful. Let's say you have an AJAX call that you're using via fetch to...

Importance of using Getters in Vanilla JavaScript

Something totally new I learnt in JavaScript from Chat GPT

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
May 23, 20232 min read

Object destructuring and assigning it to an existing object's key:value pairs · Today I learnt something totally brand new in JavaScript from ChatGPT...

Something totally new I learnt in JavaScript from Chat GPT

Initializing an object property if assigning to it fails

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
Apr 22, 20232 min read

JavaScript Error Messages in Chrome vs FireFox vs Safari · If you initialize a variable like let applications = {} and assign a property of applications...

Initializing an object property if assigning to it fails

Client-side AJAX using JSON

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
Mar 1, 20232 min read

Using real JSON content-type to request and respond with · Very often, many developers, including myself in the past, normally all along we were using...

Client-side AJAX using JSON

Using Optional Chaining for checking for existence of nested Object key

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
Sep 7, 20221 min read

In PHP we can do use isset() for checking the existence of a deeply nested array's key since the beginning of time : <?php $p1 =...

Using Optional Chaining for checking for existence of nested Object key

reduce function

Anjanesh LekshminarayananAnjanesh Lekshminarayanan
Jul 4, 20221 min read

Count the number of times a value of a particular type in an object exists · I hope this code on how to understand the reduce function in JavaScript is...

reduce function