What is console.log?

It’s not a jQuery feature but a feature for debugging purposes. You can for instance log something to the console when something happens. For instance: You’d then see #someButton was clicked in Firebug’s “Console” tab (or another tool’s console — e.g. Chrome’s Web Inspector) when you would click the button. For some reasons, the console … Read more

What does href expression do?

An <a> element is invalid HTML unless it has either an href or name attribute. If you want it to render correctly as a link (ie underlined, hand pointer, etc), then it will only do so if it has a href attribute. Code like this is therefore sometimes used as a way of making a link, but without having to provide an actual … Read more

How to format a JavaScript date

For custom-delimited date formats, you have to pull out the date (or time) components from a DateTimeFormat object (which is part of the ECMAScript Internationalization API), and then manually create a string with the delimiters you want. To do this, you can use DateTimeFormat#formatToParts. You could destructure the array, but that is not ideal, as … Read more