promiseのthen,reason
<apex:page>
<html>
<head>
</head>
<body>
<script type="text/javascript">
const promise1 = new Promise((resolve, reject) => {
resolve('Success!');
});
promise1
.then((value) => {
console.log(value);
// expected output: "Success!"
}
,reason => {
console.log("Error!");
});
</script>
</body>
</html>
</apex:page>