var chineseBox = {}; chineseBox.content = chineseBox; show("content" in chineseBox); show("content" in chineseBox.content);
var propertyName = "length";
var text = "mainline";
show(text[propertyName]);
结果:
true
true
8
var chineseBox = {}; chineseBox.content = chineseBox; show("content" in chineseBox); show("content" in chineseBox.content);
var propertyName = "length";
var text = "mainline";
show(text[propertyName]);
结果:
true
true
8