Short circuit assignment / evaluation is rooted in boolean logic. It is a piece of modern day JavaScript development pattern that is centered to many code bases. Mastery of its working is essential to performing as a competent developer. The following article examines this topic in depth.

Image for post
Image for post
By the end of this article, you will know the returned values of these absurd short circuit evaluation statements

Summary: Short circuit is the process of assigning a variable from a single term after evaluating the entire double or multi-term boolean statements. Short circuit assignment either stops at a falsy value in an AND operation, stops at a truthy value in an OR operation, or stops at the final value if a falsy vale in an AND operation or a truthy value in an OR operation could no be found.

  • Example 1 : (term1 && term2)
    Case of short circuit assignment with the AND / && operator.
  • Example 2 : (term3 || term4) Case of short circuit assignment with…

This is a tutorial on how to build a very basic tic-tac-toe game with vanilla javascript, html, css.

Final result
Final result
Final product

Github Repo:


  • Board size is dynamically generated upon user’s input instead of being static and hard-coded.
  • Winning score can be set manually.
  • This app now has a score counting, reset, and changing player’s avatar feature. The guide to this second part is coming soon.


Step 1: Create index.html. Generate a boiler plate through snippet code and attach css and js external files

<!DOCTYPE html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>Tic Tac Toe</title><link rel="stylesheet" href="style.css" /></head><body><div class="container box"><h1>Tic Tac Toe</h1></div><script src="script.js"></script></body></html>

Step 2

My partner just got upset with something. I kind of know what it is just by looking at her. No, not what she’s upset about but what that feeling is like.

I have finished the ‘MVP’ of my bootcamp fullstack Rails assignment yesterday. Now comes more advanced features and wireframing. I have until 10pm tomorrow.

I have tortured myself over the last two weeks studying and coding from morning to night, always being the first thing to do when I wake up until a few hours before going to bed in the middle of the night. For some reason, I…

The last week has been extremely harsh on me. It has not only thrown me into a cycle of realistic negative events, but also deep self-reflections. …

Duke Nguyen

Polyglot & Junior Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store