Good usage of the `||` operator to set default values. However, you might want to read this for some edge cases that this does not account for:

http://stackoverflow.com/questions/148901/is-there-a-better-way-to-do-optional-function-parameters-in-javascript