웹개발/Js & Jquery
[JavaScript] nvl,isNull,isUndefined를 자바스크립트에서 구현하는 방법
kmhan
2018. 2. 21. 20:36
728x90
반응형
nvl,isNull,isUndefined를 자바스크립트에서 구현하는 방법
nvl
function nvl(A,B){ if(isNull(A) || isUndefined(A)){ return B; } else { return A; } } |
isNull
function isNull(value) { var _chkStr = value + ""; if(_chkStr==""||_chkStr==null||_chkStr=="null"){ } else { } } |
isUndefined
function isUndefined(value) { if(typeof(value)==undefined || typeof(value)=="undefined" || value=="undefined" || value==undefined) {return true;} return false; } |
728x90
반응형