n
Size: a a a
n
С
n
n
V
n
AV
V
T
YD
n
import './ui/header.ts'
import './ui/menu.ts'
class Sticky {
constructor(el) {
this.el = el;
....
this.events = {
scroll: this.handleScroll.bind(this),
resize: this.handleResize.bind(this)
};
}
handleScroll() {
....
}
handleResize() {
....
}
unbindEvents() {
....
}
bindEvents() {
....
}
}
const stickies = document.querySelectorAll('.js-sticky');
if (stickies.length) {
[...stickies].forEach(stiky => {
let sticky1 = new Sticky(stiky)
sticky1.bindEvents()
})
}
S
import './ui/header.ts'
import './ui/menu.ts'
class Sticky {
constructor(el) {
this.el = el;
....
this.events = {
scroll: this.handleScroll.bind(this),
resize: this.handleResize.bind(this)
};
}
handleScroll() {
....
}
handleResize() {
....
}
unbindEvents() {
....
}
bindEvents() {
....
}
}
const stickies = document.querySelectorAll('.js-sticky');
if (stickies.length) {
[...stickies].forEach(stiky => {
let sticky1 = new Sticky(stiky)
sticky1.bindEvents()
})
}
YD
import './ui/header.ts'
import './ui/menu.ts'
class Sticky {
constructor(el) {
this.el = el;
....
this.events = {
scroll: this.handleScroll.bind(this),
resize: this.handleResize.bind(this)
};
}
handleScroll() {
....
}
handleResize() {
....
}
unbindEvents() {
....
}
bindEvents() {
....
}
}
const stickies = document.querySelectorAll('.js-sticky');
if (stickies.length) {
[...stickies].forEach(stiky => {
let sticky1 = new Sticky(stiky)
sticky1.bindEvents()
})
}
n
YD
АН
let sum=(a,b)=>{
return new Promise((resolve, reject)=>{
const ww=a+b
ww==10 ? resolve(ww): reject(new Error(`No numbe ${ww}`))
}
)}
async function re(a,b){
try{
return await sum(a,b)
} catch(erro){
return erro.message
}
}
(async ()=>console.log(await re(5,5))) ()
(async ()=> console.log(await re(5,1))) ()
VH
let sum=(a,b)=>{
return new Promise((resolve, reject)=>{
const ww=a+b
ww==10 ? resolve(ww): reject(new Error(`No numbe ${ww}`))
}
)}
async function re(a,b){
try{
return await sum(a,b)
} catch(erro){
return erro.message
}
}
(async ()=>console.log(await re(5,5))) ()
(async ()=> console.log(await re(5,1))) ()
(async ()=>console.log(await re(5,5))) ();
(async ()=> console.log(await re(5,1))) ()
VH
АН