Top "Typeof" questions

Typeof (alternately typeof or TypeOf) is an operator provided by several programming languages which determines the data type of a given variable.

_.isFunction(a) vs. typeof a === 'function'? javascript

I think it might be only performance case - http://jsperf.com/comparing-underscore-js-isfunction-with-typeof-function/2 And seems that typeof is faster.. so …

javascript performance underscore.js typeof
How to check the object type on runtime in TypeScript?

I'm trying to find a way to pass an object to function in and check it type in a runtime. …

typescript types runtime detect typeof
Differences between typeof and instanceof in JavaScript

I'm working with node.js, so this could be specific to V8. I've always noticed some weirdness with differences between …

javascript node.js syntax instanceof typeof
How to determine if Native JavaScript Object has a Property/Method?

I thought this would be as easy as: if(typeof(Array.push) == 'undefined'){ //not defined, prototype a version of the …

javascript methods properties native typeof
How to check if an object is not an array?

So i have a function that needs to check if an argument is an object, but this fails because: typeof [] // …

javascript types typeof
How to determine the primitive type of a primitive variable?

Is there a "typeof" like function in Java that returns the type of a primitive data type (PDT) variable or …

java primitive-types typeof
When is a MailItem not a MailItem?

I have written a message handler function in Outlook's Visual Basic (we're using Outlook 2003 and Exchange Server) to help me …

vba outlook typeof mailitem outlook-2003
What is the type of lambda when deduced with "auto" in C++11?

I had a perception that, type of a lambda is a function pointer. When I performed following test, I found …

c++ lambda c++11 typeof auto
typeof for RegExp

Is there anyway to detect if a JavaScript object is a regex? For example, I would like to do something …

javascript regex constructor instanceof typeof
Why JavaScript says that a number is not a number?

I have a piece of JavaScript code which is expected to set an integer value to a variable. Something is …

javascript nan typeof