I always forget about references until I struggle with problems and realized it's my fault haha. Didn't know about hoisting, I always use the same structure and declare everything in order. Event delegation, never think about that, it's seems really useful. Deboucing, I use it a lot for Ajax search. Throttling? Didn't know, since I avoid to have so many events fired at the same time. About cloning objects, I use json to parse and create another object, but is a good practice?
About cloning objects, I use json to parse and create another object, but is a good practice?
"If your object is "small" and contains exclusively serializable properties, a simple deepCopy hack using JSON serialization should be OK. But, if your object is large, you could run into problems. And if it contains unserializable properties, those'll go missing:" stackoverflow.com/questions/206623...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for this post. It's really informative.
I always forget about references until I struggle with problems and realized it's my fault haha. Didn't know about hoisting, I always use the same structure and declare everything in order. Event delegation, never think about that, it's seems really useful. Deboucing, I use it a lot for Ajax search. Throttling? Didn't know, since I avoid to have so many events fired at the same time. About cloning objects, I use json to parse and create another object, but is a good practice?
"If your object is "small" and contains exclusively serializable properties, a simple deepCopy hack using JSON serialization should be OK. But, if your object is large, you could run into problems. And if it contains unserializable properties, those'll go missing:"
stackoverflow.com/questions/206623...