In this post we’ll learn from Basic to advanced Java scripts.
- JavaScript is the most popular programming language in the world.
- JavaScript is the programming language of the web.
- JavaScript is easy to learn.
- This tutorial will teach you JavaScript from basic to advanced.
Why should you learn JavaScript?
JavaScript is one of 3 languages ââevery web developer should learn:
- HTML to define the content of the website
- CSS to define the layout of the website
- JavaScript to program the operation of websites
History of versions of JavaScript:
- The Original JavaScript ES1 ES2 ES3 (1997-1999)
- The First Main Revision ES5 (2009)
- The Second Revision ES6 (2015)
- All Yearly new Additions (2016 to 2022)
FAQ of JavaScript:
1. Is JavaScript Free?
Yes, JavaScript is free for everyone.
2. Where can I download JavaScript?
No download is required. JavaScript is already running in the browser on your computer, tablet, and smartphone.
3. How do I get JavaScript?
You don’t have to get or download JavaScript.
JavaScript Can Change HTML Content
You can first find id of you HTML object using getElementById() and then using innerHTML changes the element content to “Hello CodeConfig”.
document.getElementById("demo").innerHTML = "Hello CodeConfig";
JavaScript Can also Change Values of HTML Attribute
Let’s check one example in which JavaScript changes the value of the src (source) attribute of an <img> tag. Means image source will get change and you will observe new image.
<!DOCTYPE html>
<html>
<body>
<h2>Learn JavaScript </h2>
<p>JavaScript can also change HTML attribute values</p>
<button onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn ON/OFF</button>
<img id="myImage" src="pic_bulboff.gif" style="width:100px">
<button onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn off the light</button>
</body>
</html>
Check more on JavaScript:
- How to Center a Popup Window on Screen
- How to hide URL in the popup window opened using window.open
- window.showModalDialog is deprecated in Edge and Chrome
- Cloning JavaScript Object with Object.create
- Set new Attribute in XML using jQuery
- How to Add Property to an object in JavaScript?
- DOMParser: parseFromString() method
- Develop Custom DOM object for Edge/Chrome
- Migrating IE ActiveXObject XMLHTTP XMLDOM to Chrome
- Operator Precedence in JavaScript
- JavaScript Var
- JavaScript Statements
- JavaScript typeof Operator
- JavaScript Yield Operator
- JavaScript Ternary Operator
- JavaScript Short Circuiting Operators
- JavaScript Pipeline Operator
- JavaScript Object Reference
- JavaScript Grouping Operator
- JavaScript Delete Operator
- JavaScript Comma Operator
- JavaScript In Operator
- JavaScript let
- JavaScript const
- Global and local variables in JavaScript
- 4 Ways to Create Objects in JavaScript
- JavaScript Json Objects
- How to Add JavaScript in HTML Document?
- JavaScript arrays examples
- JavaScript Arrays
- JavaScript Objects with Examples
- JavaScript Objects
- JavaScript Functions
- JavaScript Output
- JavaScript Operators
- JavaScript Data Types
- JavaScript Comments
- JavaScript Variables
- JavaScript Where and Whys
- JavaScript Versions