• But if you use a HTML doctype and use <br /> instead of <br>, your code won’t validate. Some of us care about the standards…

  • Wouldn’t it had been easier like this:

  • I mean:

  • I didn’t mean that. Why use a function with no parameters and then calling arguments[0] when you can use a function with a parameter and provide a default value when it’s null?

  • I just realized that I used a C# construct there. Instead of br??’something’ I meant br?br:’something’.

  • I’m not getting it!

  • He meant that it would be easier/more readable/nicer to use the default operator instead of having an if/else branch and accessing the arguments object. Like this:

    That OR operator is called “default operator” when used in this context and it basically says something like: if first argument evaluates to true, return it, otherwise, return second argument.

  • Well, I use it to improve the code readability. Some users may not be be familiar with the || construct.

Advertisment ad adsense adlogger