JSFiddle - React, Tailwind, and code Playground

HTML

<div id="output"></div>

JavaScript

i = 0;
x = 0;


if (i == 2){x=1;}else{x=i+1;}

console.log(x);