TheRandomCrew / TicTacToe-JS

A Tic Tac Toe game you can play in your browser!
https://raw.githack.com/Israel-Laguan/TicTacToe-JS/24623a2bc3f0764698f32103f8b48074abf91278/index.html
Apache License 2.0
1 stars 3 forks source link

const game = (() => { #17

Closed arandamerinoalberto closed 1 year ago

arandamerinoalberto commented 4 years ago

https://github.com/Israel-Laguan/TicTacToe-JS/blob/9e364a84be1f8036185a08785785756461e73c20/src/js/game.js#L2

I don't understand this code line. It's a empty variable ?

Israel-Laguan commented 4 years ago

It's a function that is automatically called when loaded, and goes by the name of IIFE. Here you have the official documentation. Notice the IIFE finish on line 129.