ES6 Arrow Functions and Promise Chaining condensed syntax explanation
问题 In the following code block, can someone please provide links or an explanation for the condensed alert statement syntax. I understand the preceding expanded equivalent code that is commented out and contains the message parameter. However, I cannot find a reference to the syntax for omitting the message parameter: let timeoutPromise = new Promise((resolve, reject) => { setTimeout(() => { resolve('Success!'); }, 2000); }); /* timeoutPromise.then(message => { alert(message); }) */