Undefined detection

Benchmark created on


Setup

function isUndefined(v) {
	return typeof v === 'undefined';
}

const UNDEFINED = 'undefined';

Test runner

Ready to run.

Testing in
TestOps/sec
typeof a === "undefined"
let a;
const b = typeof a === 'undefined';
ready
isUndefined(a)
let a;
const b = isUndefined(a);

ready
typeof a === UNDEFINED
let a;
const b = typeof a === UNDEFINED
ready
a === undefined
let a;
const b = a === undefined;
ready

Revisions

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