var object={
firstString: 'You must register in order...',
secondString:'You must re-enter your password in order to...',
thirdString:'You must re-enter your password in order to...'
};
如您所见,第二个和第三个字符串是相同的。因为这在我现在使用的对象中多次发生,所以我想将第三个对象与第二个对象链接起来以节省一些字节
我尝试了以下方法,但它们不起作用
var object={
firstString:'You must register in order...',
secondString:'You must re-enter your password in order to...',
thirdString:this.secondString
};
var object={
firstString:'You must register in order...',
secondString:'You must re-enter your password in order to...',
thirdString:object.secondString
};
谢谢