Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
example for node promises
//nodejs v4.2.6 function first(val){ var d=val+10; console.log("first",d); return d; } function second(val){ var d=val+10; console.log("second",d); return d; } function third(val){ var d=val+10; console.log("third",d); return d; } var promise=new Promise(function(data,reject){ data(20); console.log("promise body"); }) promise.then(third).then(first).then(second).then(function(res){ console.log("promise call" ,res); });
run
|
edit
|
history
|
help
0
localhost:8080/?name=2017&lname=July
Lowertoupper
apply
horsevalue
Tree Structure
ddd
Get stack from error
Holyboi
Find the missing number in array
JSON parse