Setting multiple variables to the same value chaining = operator Hi ! I’m currently working on a small side project where I need to set 2 variables to the same value.

This looks like this : 

    let input = "";
    let result = "";
    // stuff happens to input and result...
    const clear = () =&gt; (input = result = "");

As the 2 variables are already declared, I suppose this will not impact the scope or something alike.

Am I understanding it correclty ? Or should just reset the 2 variables independently ?

Thanks for the help 🙂