Javascript/valueOf()

解説 オブジェクトの持つ本質的な値を取得します。
sample1
sample1code
function s1Func(a){
  alert(typeof a.valueOf());
}
	
smaple2
sample2code
function s2Func(){
  var b = "bbb";
  var c = 123;
  if(typeof b.valueOf() == "string" && typeof c.valueOf() == "number"){
    alert("yes");
  } else {
  	alert("no");
  }
}