Région de recherche :

Date :

https://developer.mozilla.org › ... › Web › JavaScript › Reference › Operators › Optional_chaining

Optional chaining (?.) - JavaScript | MDN - MDN Web Docs

The optional chaining (?.) operator accesses an object's property or calls a function. If the object accessed or function called using this operator is undefined or null, the expression short circuits and evaluates to undefined instead of throwing an error.

https://stackoverflow.com › questions › 1099628

How does basic object/function chaining work in javascript?

Method chaining is pretty much calling a method of the object being returned by another function/method. for example (using jquery): $('#demo'); this jquery function selects and returns a jquery object the DOM element with the id demo. if the element was a text node(element), we could chain on a method of the object that was returned ...

https://x-team.com › blog › javascript-method-chaining

Method Chaining in JavaScript - X-Team

Want to break up a function in JavaScript without it losing its meaning or its context? Think method chaining. Here's how to chain methods in JavaScript.

Method Chaining in JavaScript - X-Team

https://www.geeksforgeeks.org › method-chaining-in-javascript

Method Chaining in JavaScript - GeeksforGeeks

In this article, we will learn how we can use optional chaining with arrays and functions in TypeScript. Optional chaining in Typescript is mainly a feature that allows us to safely access the properties or the call functions on potentially null or undefined values without causing any runtime errors. We will see three different ...

https://fr.javascript.info › promise-chaining

Chaînage des promesses - JavaScript

fetch('/article/promise-chaining/user.json') // .then ci-dessous s'exécute lorsque le serveur distant répond .then(function(response) { // response.text() renvoie une nouvelle promesse qui résout avec le texte de réponse complet // quand ça charge return response.text(); }) .then(function(text) { // ...et voici le contenu du fichier ...

https://www.golinuxcloud.com › javascript-chain-functions

JavaScript Chain Functions Examples - GoLinuxCloud

In JavaScript, we have the ability to chain functions together, which can make code more readable and maintainable. Chaining functions is a technique that allows developers to chain multiple functions together in a sequence, where the output of one function becomes the input of the next function.

JavaScript Chain Functions Examples - GoLinuxCloud

https://lual.dev › blog › js-method-chaining

Mastering JavaScript Method Chaining: A Comprehensive Guide

Explore JavaScript method chaining with our comprehensive guide. Discover how to streamline code by linking operations, from string manipulation to DOM interactions. Enhance programming efficiency while keeping your codebase clear and concise.

https://javascript.info › optional-chaining

Optional chaining - The Modern JavaScript Tutorial

The optional chaining ?. is not an operator, but a special syntax construct, that also works with functions and square brackets. For example, ?.() is used to call a function that may not exist. In the code below, some of our users have admin method, and some don’t:

https://javascript.info › promise-chaining

Promises chaining - The Modern JavaScript Tutorial

Chaining is used much more often. Returning promises. A handler, used in .then(handler) may create and return a promise. In that case further handlers wait until it settles, and then get its result. For instance:

https://betterprogramming.pub › how-to-use-chaining-in-javascript-like-a-pro-ff9c1b89d9a9

How to Use Chaining in JavaScript Like a Pro - Better Programming

Method chaining, or simply chaining, in JavaScript can be defined as when one or more sequential methods get invoked from an object without the introduction of unnecessary variables. The sole purpose of chaining is to make our code more readable and reduce the redundancy within.