• swnt@feddit.de
    link
    fedilink
    arrow-up
    51
    ·
    1 year ago

    While the idea and visualisation is indeed good, there is an error in the visualization.

    Namely, the meaning of “->” is inconsistent. IMO it should be the return value of the function call (like in reverse), but for at least pop, the visualization shows the array instead of the array + return value.

    For pop the return value isn’t the array itself, but the popped value: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop

    The visualisation could be improved by clarifying, that the array after the function call is visualised. And using -> isn’t the best option IMO, because people expect the right side to contain the return value.