코드 :
function is_regexp(value) { return toString.call(value) === '[object RegExp]'; } console.log(is_regexp(/test/)); console.log(is_regexp('bar')); console.log(is_regexp(72));
결과 :
true
false
등록된 댓글이 없습니다.
코리아뉴스 2001 - , All right reserved. 더보기