Why this code doesn't generate any output?

Hi! I wonder why this code doesn’t show anything. Should’t the acessor method “set_maxActiveEnemies” set the value of maxActiveEnemies to 3?

It’s because your setter method doesn’t actually assign the value. It should be:

	function set_maxActiveEnemies(maxActiveEnemies)
		this.maxActiveEnemies = maxActiveEnemies;
		return maxActiveEnemies;

		// or, in one line:
		// return this.maxActiveEnemies = maxActiveEnemies;

Thank! So simple.