Lesson 1: Introduction to JavaScript Flashcards
What can’t JavaScript do?
Directly access files on the server or client machine.
JavaScript is use to..?
Add features and enhance user experience.
What are some uses of JavaScript on a webpage?
- Handling user interactions
- Producing complex animations and web games
- Supporting server-side functions
What are two commonly used web design strategies?
Graceful Degradation and Progressive Enhancement.
What is Graceful Degradation?
Building a website that works best in modern browsers.
What is Progressive Enhancement?
Building a website from the ground up with base level functionality.
Each object has certain properties and methods. How do you access them using the Dot Notation?
window. document.write(“Welcome to the page!”);
window. alert(“Hello there!”);
Write an HTML or a text string in place:
document.write(“string”) - String may include HTML tags.
Show a pop up message:
alert(“text message”);
Prompt for user input:
let input = prompt (“message”);
Where does JavaScript get put on a webpage?
At the end above the body tag.
Write a JavaScript link:
What is a Document Object Model (DOM)?
A way of visualizing a document and its contents.