CSCI 3403 - Web Programming | Day 19
Name: _________________________________ Date: _____________
number
- Example: _________________string
- Example: _________________boolean
- Values: _________ or __________________________
- Variable declared but not assigned_________________
- Intentionally empty valuesymbol
- Used for: _________________bigint
- Used for: _________________8. _________________
- Includes arrays, functions, and more complex data
Type | Symbol | Special Feature |
---|---|---|
Single quotes | _____ | Basic string |
Double quotes | _____ | Basic string |
Backticks | _____ | Template literals - allows _________________ |
Fill in what each method does:
Method | What it does | Example Result |
---|---|---|
.length |
_________________________ | "Hello".length = _____ |
.toUpperCase() |
_________________________ | "hello".toUpperCase() = _________ |
.toLowerCase() |
_________________________ | "HELLO".toLowerCase() = _________ |
.slice(start, end) |
_________________________ | "JavaScript".slice(0, 4) = _________ |
.replace(old, new) |
_________________________ | "Hi there".replace("Hi", "Hey") = _____________ |
.indexOf(text) |
_________________________ | "Hello World".indexOf("World") = _____ |
Complete the common escape sequences:
\n
= _________________\t
= _________________\\
= _________________\"
= _________________\'
= _________________Operator | Name | Example | Result |
---|---|---|---|
== |
Equal (loose) | 5 == "5" | _________ |
=== |
Equal (strict) | 5 === "5" | _________ |
!= |
_________________ | 5 != 3 | _________ |
!== |
_________________ | 5 !== "5" | _________ |
> |
_________________ | 10 > 5 | _________ |
< |
_________________ | 5 < 10 | _________ |
&&
means _________ - Both conditions must be _________||
means _________ - At least one condition must be _________!
means _________ - Flips the boolean value_________
_________
(the number)_________
(empty string)_________
_________
_________
(Not a Number)Including:
What is nesting? _________________________________________
_________________________________________
Complete the function to return "Hello, World!":
Complete the function to add two numbers:
Exercise | Description | Key Concepts |
---|---|---|
03_numberChecker | Check properties of numbers | _________________ |
04_mathEquations | Solve math problems | _________________ |
05_joinStrings | Concatenate strings | _________________ |
if (variable) {...}
let x = input || "default"
if (x >= min && x <= max)
console.log()
liberallytypeof variable
!!value
Use this space for any additional notes during the lecture: