Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
if undefined comparison
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0
Browser:
Opera 109
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
case 1
54.2M/s
case 2
49.7M/s
case 3
4.5M/s
View exact numbers
Test name
Executions per second
✓
case 1
54,221,940 Ops/sec
case 2
49,691,644 Ops/sec
case 3
4,514,992 Ops/sec
Tests:
case 1
const obj = { 2: true, 7: true } if (obj[3]) { } obj[3] = true;
case 2
const obj = { 2: true, 7: true } if (typeof obj[3] !== 'undefined') { } obj[3] = true;
case 3
const obj = { 2: true, 7: true } if (obj[3] !== undefined) { } obj[3] = true;