DEV Community

Discussion on: Eighth-week web dev

Collapse
 
valeriavg profile image
Valeria

Nicely done! One little thing though, in tic-tac-toe instead of doing this:

document.getElementById(control.id).innerHTML="X"
Enter fullscreen mode Exit fullscreen mode

You can simply do:

control.innerHTML="X"
Enter fullscreen mode Exit fullscreen mode

The reference to the object in DOM tree will be valid until the element is removed from DOM.

Collapse
 
gauravrandheer profile image
Gaurav

Thanks