IS
Size: a a a
IS
В
В
НК
НК
j
j
В
В
j
const obj = {}
const descriptorA = {}
const desctiptorB = {
get: function () {
return function (value) {
console.log('Set ' + value)
}
}
}
Object.defineProperty(descriptorA, 'set', desctiptorB)
Object.defineProperty(obj, 'value', descriptorA)
obj.value = 100
E
let d = new Date(moment().format("YYYY-MM-DD"));
let todayMonth = d.getMonth() + 1;
let todayDate = d.getDate();
let todayYear = d.getFullYear() + 2;
let maxDate = todayYear + "-" + todayMonth + "-" + todayDate;
При выводе maxDate получаю 2023-7-7. Как получать 2023-07-07 ?j
В
j
В
В
IS
В
j
myLibrary.value = 100
console.log(myLibrary.value)
myLibrary.setValue(100)
console.log(myLibrary.getValue())