0
Why if I write a function called close(), it doesn'work, but if I change its name it works?
https://code.sololearn.com/Wh4st9GGiaLa/?ref=app https://code.sololearn.com/WyU8ju4FBr8X/?ref=app
8 Respuestas
+ 4
Richard What's your question? Can you elaborate
+ 3
Richard Share your code
+ 3
probably because close() is a builtin global function wich cannot be overrided (even if getOwnPropertyDescriptor return writable:true and configurable:true) ^^
+ 2
Richard what is "o"?
0
I edited the comment. The only thing I have changed is the name of the function. In the first case the function closebtn() let me close the side bar.
In the second code the function close() doesn't close the side bar
0
Richard Check this
when you are using built in function you need be careful Close() you wrote c small letter that's why https://code.sololearn.com/WT30lVmMfMi0/?ref=app
0
Close is a keyword in some Lang so you don't same name ✌️ hope you understand