CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 05:14:41 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=b8bd4b3698ce8e8d5e199b6c54ee6f12b75e687a3b8dc3bd8046017fc9b24da8a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%229Z4Plemoem4fAs2Q0fF6AwAcJmpLLKsJ%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d41d78bde2b080-BLR
Nodejs Promise - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The return of the .then function will be the resolved value of the promise.
- # tambahkan await sebelum initPromise jika mau menunggu proses
- function initPromise() {
- return new Promise(function(res, rej) {
- res("initResolve")
- })
- }
- initPromise()
- .then(function(result) {
- console.log(result) // "initResolve"
- return "normalReturn"
- })
- .then(function(result) {
- console.log(result) // "normalReturn"
- })
- # If the .then function returns a Promise, then the resolved value of that chained promise is passed to the following .then.
- function initPromise() {
- return new Promise(function(res, rej) {
- res("initResolve")
- })
- }
- initPromise()
- .then(function(result) {
- console.log(result) // "initResolve"
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- resolve("secondPromise")
- }, 1000)
- })
- })
- .then(function(result) {
- console.log(result) // "secondPromise"
- })
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 2 sec ago | 0.10 KB
-
📝 Exchange profit method
JavaScript | 5 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch
JavaScript | 17 sec ago | 0.24 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 27 sec ago | 0.24 KB
-
📌 Instant BTC Profit Method ✅ Working
JavaScript | 46 sec ago | 0.24 KB
-
📝 Crypto Swap Glitch ✅ Working
JavaScript | 56 sec ago | 0.24 KB
-
📌 ChangeNOW Exploit
JavaScript | 1 min ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ H
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand