doesn't make sense to have a default value for numTimes in times() drone method.
This commit is contained in:
parent
e924c6837c
commit
3ba7200ab0
1 changed files with 1 additions and 4 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue