`(line.length > 0) ? line : "",` is called `ternary if` http://en.wikipedia.org/wiki/%3F:

you can replace it with just `line` because you know it will be a string ... this would make sense only if you wanted to return something else than "" on zero length