js-对象学习内容

js 对象的连续调用this

var chloe = {
	height: function() {
		console.log("Well, currently, I am only 165cm in stature.");
		return this;
	},

	smoke: function() {
		console.log ('NOT A SMOKER.');
		return this;
	},

	drink: function() {
		console.log('I want Whisky on the rocks!');
		return this;
	}
}
  chloe.height().smoke().drink();
相关文章
相关标签/搜索