指定したプロパティがストリングに含まれるかどうかを検査します。
| パラメータ | 説明 |
|---|---|
| property | プロパティの名前。 |
| 戻り値 | 説明 |
|---|---|
| boolean | オブジェクトにそのプロパティがある場合は true、その他の場合は false。 |
var regexp = /(Moscow)/;
return "constructor = " + regexp.hasOwnProperty("constructor") +
"¥nlength = " + regexp.hasOwnProperty("length") +
"¥nprototype = " + regexp.hasOwnProperty("prototype")