Skip to content

Commit 3bcb1d2

Browse files
committed
code review
1 parent 8180120 commit 3bcb1d2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/site/navigation.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@
244244
"link": "/learn/asynchronous-work/javascript-asynchronous-programming-and-callbacks",
245245
"label": "components.navigation.learn.asynchronousWork.links.javascriptAsynchronousProgrammingAndCallbacks"
246246
},
247-
"promisesInNodejs": {
248-
"link": "/learn/asynchronous-work/promises-in-nodejs",
249-
"label": "components.navigation.learn.asynchronousWork.links.promisesInNodejs"
247+
"discoverPromisesInNodejs": {
248+
"link": "/learn/asynchronous-work/discover-promises-in-nodejs",
249+
"label": "components.navigation.learn.asynchronousWork.links.discoverPromisesInNodejs"
250250
},
251251
"discoverJavascriptTimers": {
252252
"link": "/learn/asynchronous-work/discover-javascript-timers",

apps/site/pages/en/learn/asynchronous-work/promises-in-nodejs.md renamed to apps/site/pages/en/learn/asynchronous-work/discover-promises-in-nodejs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Promises in Node.js
2+
title: Discover Promises in Node.js
33
layout: learn
44
authors: avivkeller
55
---
66

7-
# Promises in Node.js
7+
# Discover Promises in Node.js
88

99
A **Promise** is a special object in JavaScript that represents the eventual completion (or failure) of an asynchronous operation and its resulting value. Think of a Promise as a placeholder for a value that is not yet available but will be in the future.
1010

@@ -96,7 +96,7 @@ promise1
9696
One of the best ways to work with Promises in modern JavaScript is using **async/await**. This allows you to write asynchronous code that looks synchronous, making it much easier to read and maintain.
9797

9898
- `async` is used to define a function that returns a Promise.
99-
- `await` is used inside an `async` function to pause execution until the Promise is resolved or rejected.
99+
- `await` is used inside an `async` function to pause execution until a Promise settles. However, in [ECMAScript Modules](https://nodejs.org/api/esm.html), you can use [`await` at the top level](https://nodejs.org/api/esm.html#top-level-await) without needing an `async` function.
100100

101101
```js
102102
async function performTasks() {

packages/i18n/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"links": {
6262
"asynchronousWork": "Asynchronous Work",
6363
"asynchronousFlowControl": "Asynchronous flow control",
64-
"promisesInNodejs": "Promises in Node.js",
64+
"discoverPromisesInNodejs": "Discover Promises in Node.js",
6565
"overviewOfBlockingVsNonBlocking": "Overview of Blocking vs Non-Blocking",
6666
"javascriptAsynchronousProgrammingAndCallbacks": "JavaScript Asynchronous Programming and Callbacks",
6767
"discoverJavascriptTimers": "Discover JavaScript Timers",

0 commit comments

Comments
 (0)