π Reference
π Chapter
set
ꡬ문μ κ°μ²΄ μμ±μ ν΄λΉ μμ±μ μ€μ νλ €κ³ ν λ νΈμΆλλ ν¨μμ λ°μΈλ© νλ€.μμ 1
const language = {
set current(name) {
this.log.push(name);
},
log: [],
};
language.current = 'EN';
language.current = 'FA';
console.log(language.log);
// Expected output: Array ["EN", "FA"]