Added midterm notes
This commit is contained in:
30
INFO-1272 (JS 1)/Notes/Midterm/index.js
Normal file
30
INFO-1272 (JS 1)/Notes/Midterm/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
// Window dialogue boxes
|
||||
window.alert("This is an alert!");
|
||||
window.prompt("This is a prompt");
|
||||
window.confirm("This is a confirm");
|
||||
|
||||
// Data types
|
||||
let userAge = Number("22");
|
||||
let userName = String("Levi");
|
||||
let isAdmin = Boolean(1);
|
||||
console.log("User age: " + userAge);
|
||||
console.log("User name: " + userName);
|
||||
console.log("Is admin? " + isAdmin);
|
||||
|
||||
// Weakly-typed variables
|
||||
|
||||
// Constants
|
||||
|
||||
// Operators
|
||||
|
||||
// Math object methods
|
||||
|
||||
// Number object methods
|
||||
|
||||
// String object methods
|
||||
|
||||
// Selection structure
|
||||
|
||||
// Functions
|
||||
|
||||
// Repitition structure
|
||||
Reference in New Issue
Block a user