//typeof can use a string to express the type name of a variable
//Judge whether a variable num is of string type
if(typeof num == 'string')
//But typeof pairs are all object array types that cannot be distinguished
//Use constructor to determine whether num is String type
if( == String)
if( == Array)
//This function determines the length and variable type of a function
function strict(types,args){
if( != ){
throw "Invalid number of parameters";
}
for(var i=0; i<; i++){
if(args[i].constructor != types[i]){
throw 'Argument type mismatch'
}
}
}