lab 6 done

This commit is contained in:
2025-12-19 13:40:00 +10:00
parent 73ea28eab6
commit 4cc6b7e9d8
2 changed files with 36 additions and 0 deletions

17
lectures/temp.js Normal file
View File

@@ -0,0 +1,17 @@
function updateDict(dict, update) {
let key, value = update.entries()[0];
dict[key] = value + (key in dict) ? dict[key] : 0;
}
aboba={"asd":123}
upd={"asd":123}
upd1={"asd":123}
updateDict(aboba,upd1)
console.log(aboba)
updateDict(aboba,upd1)
console.log(aboba)