What is java Script :
JavaScript is a scripting language used to make websites interactive.
It's also a dynamically typed language, meaning you don’t need to explicitly declare data types.
Example :
let x = 5;
x = "Hello";
Basic Features of JavaScript:
- Variables
- Functions
- Events
- Loops
- Conditions
What is DOM Manipulation :
DOM Manipulation means using JavaScript to change the content, structure, or style of a web page after it’s loaded.
letting you update text, add elements, remove elements, change styles, and respond to user actions dynamically.
Simple Words:
Imagine your web page is like a notice board at school.
The board itself is the** HTML structure (DOM tree) **— with pins and papers already set up when the page loads.
Now, you (JavaScript) walk up to the board and:
- Change the text on a pinned note
- Add a new announcement to the board
- Remove an outdated paper
- Highlight something in red to grab attention
That’s exactly what DOM manipulation does — it lets your JavaScript “walk up” to the webpage, find the right element, and change it on the fly without replacing the whole board.
Code:
let name = "Alice";
let age = 21;
console.log("My name is " + name);
console.log("I am " + age + " years old.");
Output:
My name is Alice
I am 21 years old.
Other things lets talk tomorrow blog......
Quotes :
“Dream big. Start small. Act now.”
Top comments (2)
The only thing that Java and JavaScript share is they both start with "Java".
“Thank you for pointing that out! Absolutely --- java and java Script are two distinct languages.My blog here focuses only on JavaScript. I’ll make sure to clarify that in case it caused any confusion. Appreciate your feedback!"