home.social

#mutationbugs — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #mutationbugs, aggregated by home.social.

  1. Array.fill() Shares Same Reference?!

    This is a TRAP! Array.fill() with an object puts the SAME object in every slot. Change one, change ALL! Every element points to the same memory location. This silent mutation will destroy your data!

    #javascript #javascripttricks #array.fill #objectreference #mutationbugs #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #referencetypes #advancedjavascript

    youtube.com/watch?v=MaOk-qGi9xw