js class compare