Skip to content

Commit ff816a3

Browse files
authored
Update 100_JS_Que
1 parent 40ef451 commit ff816a3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

100Questions/100_JS_Que

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,15 @@ let x =100;
596596
console.log(x); //100
597597
//Explaination: x=10 contain inside a block because we already declare with 100 outside so it will print 100.
598598
-------------------------------------------------------------------------------------------
599-
599+
const func = (function(a){
600+
delete a;
601+
return a;
602+
} )(5)
603+
console.log(func);
604+
605+
output: 5
606+
//delete keyword only use with object properties. here a is a variable so it will not work the variable.
607+
------------------------------------------------------------------------------------------
600608

601609

602610

0 commit comments

Comments
 (0)