loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.30377402034159084","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"ZnVuY3Rpb24gcHJvbWlzZVdvcmRBcHBlbmRlcih3b3JkKSB7IAogICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZSh3b3JkKTsKfQoKbGV0IHRlc3QxID0gcHJvbWlzZVdvcmRBcHBlbmRlcigiSXQncyBhIEJpcmQuLi4iKTsKCnRlc3QxLnRoZW4oZnVuY3Rpb24ocmVzdWx0KSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3VsdCk7CiAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAiSXQncyBhIHBsYW5lLi4uIjsKICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uKHJlc3VsdCkgeyAKICAgICAgICAgICAgY29uc29sZS5sb2cocmVzdWx0KTsKICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICJObyBpdCdzIEphdmFTY3JpcHQgUHJvbWlzZXMiCiAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbihyZXN1bHQpIHsgCiAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3VsdCk7CiAgICAgICAgICAgfSk7"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function promiseWordAppender(word) { 
    return Promise.resolve(word);
}

let test1 = promiseWordAppender("It's a Bird...");

test1.then(function(result) {
            console.log(result);
            return result + "It's a plane...";
           }).then(function(result) { 
            console.log(result);
            return result + "No it's JavaScript Promises"
           }).then(function(result) { 
            console.log(result);
           });
Native Browser JavaScript