I agree. Undefined is fine. and btw in ruby it is 
```
(text||"")*number
```
and for negative number it raises exception and what is interesting for 0 it return empty string, so same behavior as your code.