CS401A's Midterms: Fundaments of Web Prog. Module 05 Flashcards
For midterm exams.
makes the website interactive and complex through the implementation of intricate features
such as displaying timely content updates and determining what happens when users click, hover, or type within specific elements in the website.
JavaScript (JS)
JavaScript Basics (Carey, Vodnik, 2022)
As each language serves a different purpose, it is necessary to use a seperate file for each, but it must be in the same
which can be a folder on the computer.
directory,
JavaScript Basics (Carey, Vodnik, 2022)
directory
For Javascript, a file extension is used.
.js
JavaScript Basics (Carey, Vodnik, 2022)
meaning a program is separated into distinct sections.
This idea is called “seperation of concerns,”
This idea is called “seperation of concerns,”
In context,
refers to the website,
the “program”
This idea is called “seperation of concerns,”
In context,
refers to the seperate files of HTML, CSS, and JavaScript.
while the “sections”
JavaScript Basics (Carey, Vodnik, 2022)
Just like in CSS,
can be referred to internally and externally,
JavaScript
JavaScript Basics (Carey, Vodnik, 2022)
the JS code is placed and can appear multiple times inside the < head> or < body> tages of an HTML document using < script> tages that encloses the JavaScript codes.
In internal or embedded JavaScript,
JavaScript Basics (Carey, Vodnik, 2022)
the separated .js file is linked using < script> tages with the src attribute are usually placed within the < head> tags.
external JavaScript,
JavaScript Basics (Carey, Vodnik, 2022)
It applies the JavaScript code to the webpage so that it can have an effect on the HTML document and anything else on it.
While in external JavaScript,
JavaScript Basics (Carey, Vodnik, 2022)
It is the line of code that browsers ignore and is used on a specific line or block of codes to add notes such as the program name and date or notes
notes such as the program name and date or notes for future programmers that might modify the program.
JavaScript Comment
JavaScript Basics (Carey, Vodnik, 2022)
is used by adding two (2) slashes ( // ) before the note or comment,
A line comment
JavaScript Basics (Carey, Vodnik, 2022)
It is an individual line of code that is enclosed within the < script> tags.
JavaScript Statement
JavaScript Basics (Carey, Vodnik, 2022)
It is a programming code that can be treated as an individual unit or component.
JavaScript Object
JavaScript Basics (Carey, Vodnik, 2022)
A JS object can be defined and created by programmers based on the program’s need aside from available objects from the
Document Object Model (DOM) and Browser Object Model (BOM)
JavaScript Basics (Carey, Vodnik, 2022)
Additionally, procedures associated with an object are called
which are actions that can be performed on it.
methods
JavaScript Basics (Carey, Vodnik, 2022)
are used and placed inside the parentheses beside it to probide more specific information about the method.
Arguments
JavaScript Basics (Carey, Vodnik, 2022)
Any text, graphics, and other information displayed on the webpage is part of the Document object, which is one of the most commonly used objects in DOM.
JavaScript Output Methods
JavaScript Basics (Carey, Vodnik, 2022)
is used to write custom information usch as username or address.
The write() method of the Document object
JavaScript Basics (Carey, Vodnik, 2022)
which is the text contained within double or single quotation marks.
text string
JavaScript Basics (Carey, Vodnik, 2022)
is a basic method used to write text to the console.
console.log
JavaScript Basics (Carey, Vodnik, 2022)
is where messages are display that are invisible to users and are separated from the HTML/CSS environment.
A console
JavaScript Basics (Carey, Vodnik, 2022)
The alert() method
JavaScript Basics (Carey, Vodnik, 2022)
parameters
JavaScript Basics (Carey, Vodnik, 2022)
JavaScript Variable
JavaScript Basics (Carey, Vodnik, 2022)
identifier
JavaScript Basics (Carey, Vodnik, 2022)
- Script
JavaScript Basics (Carey, Vodnik, 2022)
- Boolean
JavaScript Basics (Carey, Vodnik, 2022)
- Number
JavaScript Basics (Carey, Vodnik, 2022)
- Null
JavaScript Basics (Carey, Vodnik, 2022)
- Undefined
JavaScript Basics (Carey, Vodnik, 2022)
An array
JavaScript Basics (Carey, Vodnik, 2022)
Control flow statements, or conditional execution,
JavaScript Basics (Carey, Vodnik, 2022)
if statement
JavaScript Basics (Carey, Vodnik, 2022)
The else keyword
JavaScript Basics (Carey, Vodnik, 2022)
are the second form of control flow statement.
Loops
JavaScript Basics (Carey, Vodnik, 2022)
are the second form of control flow statement.
loops
JavaScript Basics (Carey, Vodnik, 2022)
are the second form of control flow statement.
An infinite loop
JavaScript Basics (Carey, Vodnik, 2022)
a counter
JavaScript Basics (Carey, Vodnik, 2022)
do while loop
JavaScript Basics (Carey, Vodnik, 2022)
for loop
for loop
initialization