+ 1
In javascript, where it is ideal to use the bracket and dot notation respectively?
https://drive.google.com/file/d/1I6mAct9WSuWR53-a8wxND9GF5zyj_Rai/view?usp=drivesdk The thing is, I have experience only in python where I use bracket notation only for arrays and dictionaries and dot only for objects. But in JS...things are little different.
2 Respuestas
+ 2
Can you show here some of those examples that is confusing you? just to be clear ...
0
dot notation for runtime known property names (and valid js identifier).
square brackets for runtime unknown property names (or invalid js identifier).