terribleMia’s avatarterribleMia’s Twitter Archive—№ 7,961

    1. …in reply to @brad_frost
      brad_frost codepen.io/mirisuzanne/pen/KKdOVrO?editors=0100 you can use global variables as default values in a function argument, and that way a new value is passed in based on the current state of the variable, rather than the initial state.
  1. …in reply to @TerribleMia
    brad_frost The difference between yours and others listed is that you have a $component argument, which is creating a new scoped variable, without reference to the global value. You can either pass in the global value as I do, or remove/rename the conflicting argument