Javascript

    Master this deck with 21 terms through effective study methods.

    Generated from uploaded pptx

    Created by @piyush

    What defines a static web page?

    Content is fixed and does not change dynamically.

    What distinguishes a dynamic web page from a static web page?

    Dynamic pages generate content at runtime based on user input.

    What is client-side scripting?

    Code executed in the user's browser after the page loads.

    What is server-side scripting?

    Code executed on the server to generate dynamic responses.

    What happens if a static web page is requested?

    The same content is served to all users without modification.

    How does JavaScript enhance web applications?

    It enables interactive and dynamic content updates.

    What is the role of the DOM in web applications?

    It represents the HTML structure, allowing manipulation via JavaScript.

    What is event-driven programming in JavaScript?

    Code execution is triggered by user actions or events.

    What is the purpose of form validation in JavaScript?

    To ensure user input meets specified criteria before submission.

    What does AJAX allow in web applications?

    Asynchronous data exchange without page reloads.

    What is the difference between var, let, and const?

    Var is function-scoped, let and const are block-scoped.

    What is variable shadowing?

    An inner variable hides an outer variable with the same name.

    What is the significance of hoisting in JavaScript?

    Declarations are moved to the top of their scope during compilation.

    What are JavaScript objects?

    Collections of key-value pairs representing real-world entities.

    What is the purpose of the this keyword in JavaScript?

    It refers to the context in which a function is executed.

    What is the difference between == and === in JavaScript?

    == checks value equality, while === checks both value and type.

    What does the fetch API do?

    It simplifies asynchronous requests to servers.

    What is the purpose of the addEventListener method?

    To attach event handlers to HTML elements.

    What happens when document.write() is used after the document is loaded?

    It overwrites the entire document content.

    What is the purpose of the getElementById method?

    To select an HTML element by its unique ID.

    What does the innerHTML property do?

    It gets or sets the HTML content of an element.