Skip to content

Instantly share code, notes, and snippets.

View wbarcovsky's full-sized avatar

Vladimir Barcovsky wbarcovsky

  • Altarix
  • Samara, RU
View GitHub Profile
class Parent {
constructor(params) {
Object.assign(this, params);
}
static fabric() {
return new Parent({ source: 'fabric', test: 1 });
}
title() {
setTimeout(function timeout() {
console.log('timeout');
}, 0);
let p = new Promise(function(resolve, reject) {
console.log('create promise');
resolve();
});
p.then(function() {
console.log('resolve promise');
});
const obj1 = {
a: 1,
b: 2,
c: 3
};
const obj2 = {
a: 10,
b: null,
c: undefined,
async function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
async function PromiseAll(args) {
args.forEach(async func => {
await func();
});
}
class Parent {
constructor(params) {
Object.assign(this, params);
}
static fabric() {
return new Parent({ source: 'fabric', test: 1 });
}
title() {
class Parent {
constructor(params) {
Object.assign(this, params);
}
static fabric() {
return new Parent({ source: 'fabric', test: 1 });
}
title() {
class Parent {
constructor(params) {
Object.assign(this, params);
}
static fabric() {
return new Parent({ source: 'fabric', test: 1 });
}
title() {
const obj1 = {
a: 1,
b: 2,
c: 3
};
const obj2 = {
a: 10,
b: null,
c: undefined,
class Parent {
constructor(params) {
Object.assign(this, params);
}
static fabric() {
return new Parent({ source: 'fabric', test: 1 });
}
title() {
{
"errorCode": "0",
"errorMessage": "Успешно",
"orderNumber": "12654",
"orderStatus": 2,
"actionCode": 0,
"actionCodeDescription": "",
"amount": 12000,
"currency": "643",
"date": 1636966243722,