JSFiddle - React, Tailwind, and code Playground

JavaScript

var obj1 = {
	val1: 1,
  val2: 2
}

var obj2 = {
	val1: 1,
  val2: 2
}

if(obj1 == obj2) {
	alert('the objects are the same')
} else {
	alert('the objects are not the same')
}