JavaScript
JavaScript is the native programming language for browsers. It is typically executed by including a
script tag such as:
<script type="text/javascript">
… your javascript here ...
</script>
alternatively, the JavaScript code can be written in a separate source file and included:
<script type="text/javascript" src="myFile.js">
</script>
JavaScript – Date object
The native JavaScript Date object holds dates and times. It has a rich set of getters and setters
associated with it.
See also:
• w3schools – JavaScript Date Object
• Dojo Dates and Times
Using JSHint
When entering JavaScript, we can use an Eclipse tool called "JSHint" to help us with syntax and
best practices. Once installed, it will show us notifications of where we can improve our
JavaScript.
One of the warnings it gives us is that our indenting is mixed spaces and tabs. Commonly we will
want to disable that indication:
In the JSHint configuration, we can switch this off:
Page 130
Kommentare zu diesen Handbüchern