Last Updated: February 25, 2016
·
275
· teknonono

get type of javascript variable

function getType(obj) { return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() }