Hello World! Why everyone say eval() function is dangerous..?
I look at my code or in someone else that uses eval() function, in the comments, they will always say: āDon't use eval() function, it's dangerous! (emoji)ā and I asked myself: āWhy they say eval() function is very dangerous?ā I only know that eval() function can only be used to compute maths like 1+1, and others. I'm so curious that I searched it, the results are: āThey are dangerous 'cause eval() function can execute untrusted codes and āblah blah blahāā I only say to myself that eval() can only compute math problems, what's and where's scary and dangerous part of it?! ( Can you exactly explain why eval() function's so dangerous, and I will be happy if you give a code example of how and why it's scary! ;) ) All answers are appreciated