JSFiddle - React, Tailwind, and code Playground

JavaScript

let test = 1

function fn1() {
	console.log(test)
}

function fn2() {
	console.log(test)
  let test = 2
}

fn1()
fn2()