Files
30-seconds-of-code/test/getType/getType.js
2018-08-02 13:49:33 +03:00

4 lines
137 B
JavaScript

const getType = v =>
v === undefined ? 'undefined' : v === null ? 'null' : v.constructor.name.toLowerCase();
module.exports = getType;