- Designed for creating network-centric applications.
- Complementary to and integrated with Java.
- Complementary to and integrated with HTML.
- Open and cross-platform
ECMA-262 is the official name of the standard. ECMAScript is the official name of the language.
1. HTML to define the content of web pages
2. CSS to specify the layout of web pages
- It can change HTML attributes
document.getElementById(“demo”).innerHTML = 5 + 6;
3. It can change CSS style: Changing the style of an HTML element is a variant of changing an HTML attribute.
document.getElementById(“demo”).style.font-size = “35px’;
4. It can hide HTML elements: Hiding of HTML elements can be done by changing the display style.
document.getElementById(“demo”).style.display = “none”;
5. It can show HTML elements: Showing hidden HTML elements can also be done by changing the display style.
document.getElementById(“demo”).style.display = “block”;
A function can be called when an event occurs like when you click on a button.
- Writing into an HTML element using innerHTML
- Writing into the HTML output using document.write()
Using document.write() after an HTML document is loaded will delete all existing html.
- Writing into an alert box using window.alert()
- Writing into the browser console using console.log
For debugging purpose you can call the console.log() method in the browser to display data.
The I’d attribute defines the HTML elements . The innerHTML property defines the HTML content .
- Keywords and
- Fixes values(literals)
- Variable values (variables).
Rules for writing fixed values:
- Numbers are written with or without decimals.
- Strings are text written with or without a double or single quote.
The var keywords tells the browser to create variables.
Identifiers are used to name variables (and keywords, and functions and label).
If you Learnt anything from this article, please do well to applaud and follow me and you can as well drop a response too.
Thank y’all for reading. Happy coding!💖💯
Remember it won’t work unless you try📌❤️