1/49
Flashcards generated from lecture notes on Fundamentals of JavaScript, focusing on vocabulary terms and definitions.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
JavaScript
An object-oriented, dynamically typed scripting language, primarily used for client-side scripting.
Dynamically Typed
Variables can be easily converted from one data type to another.
Client-Side Scripting
The browser running code locally rather than relying on the server to execute code.
Advantage of Client-Side Scripting
Reduces the load on the server by processing on client machines.
Advantage of Client-Side Scripting
Allows for rapid response to user events, improving user experience.
Advantage of Client-Side Scripting
JavaScript can interact with downloaded HTML to create a desktop-like user experience.
Disadvantage of Client-Side Scripting
Any required functionality must be implemented redundantly on the server if JavaScript is not enabled.
Disadvantage of Client-Side Scripting
JavaScript-heavy web applications can be complicated to debug and maintain.
JavaScript Fault Tolerance
If a page has invalid JavaScript, it will simply stop execution at the invalid line.
JavaScript Browser Support
Newer features of JavaScript may not be supported in all browsers.
Server-Side Development
Environments for server-side development, such as Node.js.
MongoDB Query Language
A query language used within noSQL databases.
IoT Control Language
A control language for Internet-of-Things (IoT) devices.
Script Placement in HTML
Placing script elements within the head element for maintainability and after CSS link elements.
Script Placement for Performance
Scripts placed at the end of the document, just before the closing body tag, for performance reasons.
Used to handle users who do not have JavaScript enabled.
Shows additional text to search engines when JavaScript is disabled.
Dynamically Typed Variables
You do not have to declare the data type of a variable before you use it.
var, const, let
Keywords used to declare variables in JavaScript.
Undefined
The initial value of a variable if not specified.
Case-Sensitive Language
JavaScript's sensitivity to case when declaring variables.
var keyword
Prior to ES6, used to declare a variable in JavaScript which is either function or global scoped.
let keyword
Creates a block-scoped variable that can be reassigned to a different value.
const keyword
Creates a block-scoped variable whose value cannot be reassigned.
Identifier requirements
Must begin with a $, _, or any character within one of several different Unicode categories.
alert()
Displays content within a browser-controlled pop-up/modal window.
console.log()
Displays content in the browser's JavaScript console.
document.write()
Outputs the content (as markup) directly to the HTML document.
prompt()
Displays a message and an input field within a modal window.
confirm()
Displays a question in a modal window with ok and cancel buttons.
Primitive Types
Represents simple forms of data.
Boolean
True or false value.
Number
Represents some type of number. Its internal format is a double precision 64-bit floating point value.
String
Represents a sequence of characters delimited by either the single or double quote characters.
Null
Has only one value: null.
Undefined
Has only one value: undefined. This value is assigned to variables that are not initialized.
Symbol
New to ES2015, a unque value that can be used as a key value.
Primitive variable memory
Each primitive variable contains the value directly within the memory for that variable.
Reference variable memory
Each reference variable contains a reference to the memory that contains the contents of that object.
const runtime exceptions
Can generate runtime exceptions, since you cannot reassign a value defined with const.
Why use const
Objects and arrays are useable.
Tells variable shouldn't be changing
It tells the browser (and you, the developer) that a variable shouldn’t be changing
Reference Types
Objects are more generally referred to.
Property
A piece of data that "belongs" to an object
Method
An action that an object can perform.
Concatenation
Combine string literals together with other variables.
Concatenate Operator
This is accomplished using the concatenate operator (+).
Seatwork Application
Used for user input and variable conversion.
Seatwork Tip Percentage
This user input should calculate a tip of 10%.
Seatwork Display
The calculation result should be shown in the console.