doesn't make sense to have a default value for numTimes in times() drone method.

This commit is contained in:
walterhiggins 2015-03-22 14:05:06 +00:00
parent e924c6837c
commit 3ba7200ab0

View file

@ -487,7 +487,7 @@ resorting to `for` or `while` loops.
#### Parameters #### Parameters
* numTimes (optional - default 2) : The number of times you want to repeat the preceding statements. * numTimes : The number of times you want to repeat the preceding statements.
#### Example #### Example
@ -541,9 +541,6 @@ Another example: This statement creates a row of trees 2 by 3 ...
***/ ***/
Drone.prototype.times = function( numTimes, commands ) { Drone.prototype.times = function( numTimes, commands ) {
if ( typeof numTimes == 'undefined' ) {
numTimes = 2;
}
if ( typeof commands == 'undefined' ) { if ( typeof commands == 'undefined' ) {
commands = this.history.concat(); commands = this.history.concat();
} }