ZS
Size: a a a
ZS
ab
slotsByDate.list.findIndex(s => {s === slot)ZS
slotsByDate.list.findIndex(s => {s === slot)ZS
ab
-1, не найдя ни одного элемента, и -1 прокидывается первым аргументом в splice, тем самым отсекая последний элементZS
-1, не найдя ни одного элемента, и -1 прокидывается первым аргументом в splice, тем самым отсекая последний элементab
ab
if(index === -1) { slotsByDate.list.splice(slotsByDate.list.findIndex(v => v.time === slot), 1)
}D
ab
AP
ab
ab
ZS
K
A
В
function currentCurret(target) {
const sel = window.getSelection()
sel.selectAllChildren(target)
sel.collapseToEnd()
target.focus()
}AI

GH
AI