Programming Tips 💡
51.7K subscribers
67 photos
10 videos
30 files
355 links
Programming & AI:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles

🇳🇱 Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
Eval 👾

if you know about the dot notation, but are ignorant of the subscript notation, you might write:

eval("myValue = myObject." + myKey + ";"); 


instead of :

myvalue = myObject[myKey]; 


The eval form is much harder to read.
This form will be significantly slower because it needs to run the compiler just to execute a trivial assignment statement ❗️

#Tips #JavaScript
@ProgrammingTip