You are on page 1of 2

ROWE L.

SABANAL 03-15-2024
BSIT2A

1. Define what is Javascript.


ANS:
JavaScript is a scripting language that enables you to create dynamically
updating content, control multimedia, animate images, and pretty much
everything else. (Okay, not everything, but it is amazing what you can
achieve with a few lines of JavaScript code.)
2. Javascript syntax.
ANS:
JavaScript syntax is the set of rules, how JavaScript programs are constructed:

3. Javascript DOM HTML


ANS:
JavaScript interacts with HTML through the Document Object Model (DOM). The
DOM is a programming interface for web documents that represents the structure
of an HTML document as a tree of objects, allowing JavaScript to access,
manipulate, and modify the content, structure, and style of HTML elements.

With the object model, JavaScript gets all the power it needs to create dynamic
HTML:
 JavaScript can change all the HTML elements in the page
 JavaScript can change all the HTML attributes in the page
 JavaScript can change all the CSS styles in the page
 JavaScript can remove existing HTML elements and attributes
 JavaScript can add new HTML elements and attributes
 JavaScript can react to all existing HTML events in the page
 JavaScript can create new HTML events in the page

4. Advantages of Javascript.
ANS:
Versatility
Interactivity
Asynchronous Programming
Large Ecosystem
Community Support
Cross-platform Compatibility
Fast Development
Integration with HTML/CSS

5. Difference between Javascript and Java.


ANS:
Java is a general-purpose language created by Sun Microsystems that is well-
known for its portability and heavy emphasis on object-oriented programming.
Originally developed by Netscape to improve web pages, JavaScript has
subsequently grown to include server-side programming and other uses.
JavaScript is dynamically typed and operated by web browsers or systems such as
Node.js, whereas Java is statically typed and runs on a virtual machine. The
languages have distinct syntaxes and execution environments even though their
names are identical.

You might also like