DEV Community

Cover image for Time For JAVA SCRIPT....
Crosston J
Crosston J

Posted on • Edited on

Time For JAVA SCRIPT....

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";
Enter fullscreen mode Exit fullscreen mode

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.");
Enter fullscreen mode Exit fullscreen mode

Output:

My name is Alice
I am 21 years old.
Enter fullscreen mode Exit fullscreen mode

Other things lets talk tomorrow blog......

Quotes :

“Dream big. Start small. Act now.”

Top comments (2)

Collapse
 
gradylink profile image
grady.link

So java is a Scripting language

The only thing that Java and JavaScript share is they both start with "Java".

Collapse
 
crosston_jack profile image
Crosston J

“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!"