- Writing into an HTML element, using innerHTML .
- Writing into the HTML output using document.write() .
- Writing into an alert box, using window.alert() .
- Writing into the browser console, using console.log() .
How does a for loop start?
When a for loop executes, the following occurs: The initializing expression initialExpression , if any, is executed. This expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity. This expression can also declare variables.
How do you write Hello World in HTML?
How to write “Hello World” in HTML
- <h1>Hello World<h1>
Use new Date() to get a Date for the current time or Date. now() to get the current time in milliseconds since 01 January, 1970 UTC. Returns a string representation of the current date and time.