As we all know, Javascript is a very flexible language. In the article I will show different ways to execute conditional code by using some common idioms from Javascript and general object-oriented techniques. Default values Javascript does not support default values for arguments and it is common to use an if statement or a conditional expression to set default values. function swim(direction, sp