Strict equality vs loose equality

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Loose
function equality(arg1, arg2){
	return arg1 == arg2
}

equality('4', 4)
ready
Strict
function equality(arg1, arg2){
	return Number(arg1) === Number(arg2)
}

equality('4', 4)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.