0
const [a, b, c] = lines[i];
if (squares[a] && squares[a] === squares[b] && squares[a] === squares[c]) {
  return squares[a];
}

I'm going through the React tutorial and I've never seen syntax like this. Can someone tell me what this is called and maybe drop a link to official docs?

Shane
  • 103
  • 6
  • 2
    [array destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) – Ruan Mendes Nov 14 '17 at 18:11
  • Yes, destructuring, as everybody else has mentioned. It's basically parallel assignment. – Andrew Nov 14 '17 at 18:13

0 Answers0