Xxx = > xx = xxx what is the word es6?

The

node = > input = node
es6 arrow function is often used, and I don"t know why I ended up with an assignment

.
render() {
    let input = "";
    return (
      <div>
        <input ref={node => input = node} />
        <button type="submit" onClick={() => {
          console.log(input.value);
        }}></button>
      </div>
    );
  }
Apr.05,2021

assignment is assignment, nothing special.


let foo;
console.log(foo=1);
let foo
function bar(){
    return foo=1;
}
let foo
()=>foo=1;

do you understand?

Menu