diff --git a/lab-01/index.html b/lab-01/index.html new file mode 100644 index 0000000..3e5f5c3 --- /dev/null +++ b/lab-01/index.html @@ -0,0 +1,41 @@ + + + + + + About Me + + + + + +

About Me

+ + + + + \ No newline at end of file diff --git a/lab-01/main.css b/lab-01/main.css new file mode 100644 index 0000000..6d7a590 --- /dev/null +++ b/lab-01/main.css @@ -0,0 +1,17 @@ +body { + margin: 0 auto; + background-color: darkgray; +} + +h1 { + font-family: Verdana, Geneva, Tahoma, sans-serif; +} + +h2 { + font-family: Verdana, Geneva, Tahoma, sans-serif; +} + +li { + font-family: Verdana, Geneva, Tahoma, sans-serif; + margin: 0 auto; +} \ No newline at end of file diff --git a/lab-01/main.js b/lab-01/main.js new file mode 100644 index 0000000..a269ea9 --- /dev/null +++ b/lab-01/main.js @@ -0,0 +1,42 @@ +console.log(alert("Let's go")); + +//These are the prompts section (pop-ups) +let name = prompt("What's your name?"); +let movies = prompt('Do you like movies?'); +let coder = prompt('Are you a coder?'); +let faveNum = prompt('What is your favorite number?'); +let sports = prompt('Do you play sports?'); +let born = prompt('Are you born in the United States?'); + +//The "if" functions section +if(name){ + document.getElementById('name').innerText = name; +} + +if(movies){ + document.getElementById('movies').innerText = movies; +} + +if(coder){ + document.getElementById('coder').innerText = coder; +} + +if(faveNum){ + document.getElementById('faveNum').innerText = faveNum; +} + +if(sports){ + document.getElementById('sports').innerText = sports; +} + +if(born){ + document.getElementById('born').innerText = born; +} + +//This section is where I put my console.log(s) +console.log(name); +console.log(movies); +console.log(coder); +console.log(faveNum); +console.log(born); + diff --git a/lab-04 cookies/index.html b/lab-04 cookies/index.html new file mode 100644 index 0000000..96ac452 --- /dev/null +++ b/lab-04 cookies/index.html @@ -0,0 +1,14 @@ + + + + + + Cookie Beatdown + + + + + + + + \ No newline at end of file diff --git a/lab-04 cookies/main.css b/lab-04 cookies/main.css new file mode 100644 index 0000000..e69de29 diff --git a/lab-04 cookies/main.js b/lab-04 cookies/main.js new file mode 100644 index 0000000..4604666 --- /dev/null +++ b/lab-04 cookies/main.js @@ -0,0 +1,70 @@ +function Store(name, location, product, costumers) { + this.storeName = name; + this.storeLoc = location; + this.storeProduct = product; + this.storeCostumers = costumers; +} + +let storeOne = new Store('Vanilla Store', 'Baltimore', 'Vanilla Cookies', 150); +let storeTwo = new Store('Chocolate Store', 'Bethesda', 'Chocolate Cookies', 180); + +console.log(storeOne); +console.log(storeTwo); + +Store.prototype.price = 7.30; +Store.prototype.revenue = 0; + +Store.prototype.calRevenue = function(){ + this.revenue = this.costumers*this.price; +} + +console.log(storeOne); +console.log(storeTwo); +// let storeOne = { +// name: 'Chocolate Store', +// product: 'Chocolate Cookies', +// costumers: 150, +// employees: 5, +// location: 'Bethesda', +// createCostumer: function() { +// console.log(this.product); +// } + +// } + +// let storeTwo = { +// name: 'Vanilla Store', +// product: 'Vanilla Cookies', +// costumers: 200, +// employees: 10, +// location: 'Baltimore', +// getProduct: function() { +// console.log(this.product); +// } +// } + +// //array of objects +// let objArray = [storeOne, storeTwo]; + +// //creating elements +// let elBody = document.getElementById('myBody'); +// let elTable = document.createElement('table'); +// console.log(elTable); +// elTable.setAttribute('class', 'class-table'); +// elBody.appendChild(elTable); + +// //looping through the array of objects +// for(let i = 0; i < objArray.length; i++) { +// let elRow = document.createElement('tr'); +// elRow.textContent = objectArray[i].name; + + + + +// console.log(objArray[i].name); +// console.log(objArray[i].location); +// console.log(objArray[i].employees); +// objArray[i].price = 10; +// objArray[i].revenue = objArray[i].price * objArray[i].costumers; +// console.log(objArray[i]); +// } \ No newline at end of file