1.function a(obj){
return typeof(obj)=="string";
}
alert(a(123));
alert(a("abc"));
2.function b(obj){
return obj.constructor === String
}
alert(b(123));
alert(b("abc"));
3.function type(data){
return Object.prototype.toString.call(data).slice(8,-1).toLowerCase();
}
alert(type(123));
alert(type("abc"));