This commit is contained in:
2024-06-02 12:22:16 +02:00
parent b8e26c7703
commit e9d6b3ad15
5 changed files with 66 additions and 0 deletions

12
4.1object/t2.js Normal file
View File

@@ -0,0 +1,12 @@
function isEmpty(obj){
let flag = 0;
for(key in obj){
flag = 1;
}
return flag == 0 ? false : true;
}
let schedule = {};
alert(isEmpty(schedule));
schedule["9:30"] = "get up"
alert(isEmpty(schedule));