Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- var promise1 = new Promise(function(resolve, reject) {
- resolve('Success!');
- });
- promise1.then(function(value) {
- console.log(value);
- // expected output: "Success!"
- }).then(function (value){
- });
- });
- </script>
- </head>
- <body>
- <p>If you click on me, I will disappear.</p>
- <p>Click me away!</p>
- <p>Click me too!</p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement