typeof vs angular.isDefined() (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<script>
var a;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
typeof undefined
a !== 'undefined'
ready
angular.isDefined
angular.isDefined(a)
ready
typeof undefined
a != "undefined"
ready

Revisions

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