Get type of variable by Alexey Zakharov March 21, 2017 JavaScript function getType(obj) { return {}.toString.call(obj).slice(8, -1); } alert(getType([]));