I want my function to have one parameter, namely boolParam, which has a default value of TRUE; In the first place, it seems that the following snippet will do, but it's absolutely wrong and boolParam will always set to TRUE even if a false value is passed to the function;
What's your solution to this using this pattern? funtion myFunc(boolParam) { boolParam = boolParam || true; /*rest of the code*/ } -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com