diff --git a/Miscellaneous/mongoDB.md b/Miscellaneous/mongoDB.md index b54676d..b175771 100644 --- a/Miscellaneous/mongoDB.md +++ b/Miscellaneous/mongoDB.md @@ -55,9 +55,9 @@ db.createUser( ) db.createUser( { - user: "yg", - pwd: "zV1pL8sP4nQ1", - roles: [ { role: "dbOwner", db: "yg" }] + user: "coc", + pwd: "qlSfefSor5", + roles: [ { role: "dbOwner", db: "coc" }] } ) ``` diff --git a/Miscellaneous/test.js b/Miscellaneous/test.js index e097741..85388b4 100644 --- a/Miscellaneous/test.js +++ b/Miscellaneous/test.js @@ -1,9 +1,15 @@ -class MyCoolArray extends Array { - first() { return this[0] } - last() { return this[this.length - 1] } -} -b = [1, 2, 3] -a = new MyCoolArray(...b) -console.log(a.first()) -console.log(a[2]) -console.log(b[-1]) \ No newline at end of file +setTimeout(() => console.log('a')); +Promise.resolve() + .then( + () => { + console.log('b'); + } + ).then( + () => Promise.resolve('c').then( + (data) => { + setTimeout(() => console.log('d')); + console.log('f'); + return data; + } + ) + ).then(data => console.log(data)); \ No newline at end of file