Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
26 changes: 26 additions & 0 deletions MAIN3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

//creating a constructor function, (template, blueprint)
let Store = function(name, location, customers){
this.name = name;
this.location = location;
this.customers = customers;
};

let storeArray = []
let storeOne = new Store('Chocolate Store', 'Bethesda', 4)
let storeTwo = new Store('Vanilla Store', 'Baltimore', 6)

storeArray.push(storeOne)
storeArray.push(storeTwo)




Store.prototype.price = 10;
Store.prototype.revenue =(storeTwo)

Store.prototype.revenue = function (){
console.log(this.consumers * this.price);
}

console.log(storeArray)
19 changes: 19 additions & 0 deletions index2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>Page Title</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
+</head>
+<body id='myBody'>
+ <div id='table-container'></div>
+ <div class='myClass'></div>
+ <div class='myClass'></div>
+ <div class='myClass'></div>
+
+
+</body>
+<script src="main.js"></script>
+</html>
Binary file added lab-01/26.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lab-01/Aqa.jpg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lab-01/congo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions lab-01/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
</head>
<body>

<h1><center>All About Me</center></h1>

<table border="2px">
<tr align="center">
<td width="200px">
<img src = '26.jpg' alt= Twenty Six width= 200px>
</td>
<td width="200px">
<img src = 'steak.jpg' alt= Steak and Potatoes width= 200px>
</td>
<td width="200px">
<img src = 'congo.png' alt='Congo'
</td>
<td width="200px">
<img src = 'Aqa.jpg.png' alt='Aquarius'>
</td>

</tr>
</table>


<ul>
<li>What is your name <u>George Iyeli Spake</u></li><br>
<li>What is your Orgin? <u>United States</u></li><br>
<li>How old are you? <u>25</u></li><br>
<li>What is your favorite food? <u> Steak and potatoes</u></li><br>
<li>What languages do you speak?<u> English, French, Spanish</u></li><br>

</ul>

<ol>
<li>Name: <span id = 'userName'>George</span></li><br>

<li><a href=https://www.google.com/search?q=seven+samurai&client=chrome-omni&source=lnms&tbm=isch&sa=X&sqi=2&ved=0ahUKEwiGrY2YhPXbAhUlMuwKHYbyACcQ_AUICygC&biw=1366&bih=640#imgrc=fhk33I8tN8_wJM:> <strong>Seven Samurai</strong></li></a><br>
<a href=http://restrepothemovie.com/>
<li><strong>Restrepo</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0381849/><li><strong>3:10 to Yuma</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0133093/><li><strong>The Matrix</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0144117/><li><strong>Boondocks Saint</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0133751/><li><strong>The Faculty</strong></li></a><br>
<a href=https://www.imdb.com/title/tt1291584/><li><strong>The Warrior</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0190332/><li><strong>Crouching Tiger Hidden Dragon</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0239948/><li><strong>Saving Silverman</strong></li></a><br>
<a href=https://www.imdb.com/title/tt0903624/><li><strong>The Hobbit</strong></li></a><br>
</ol>
<p>Are you in America?.</p>

<button onclick="myFunction()">1</button>



</script>

function myFunction() {
confirm("Are you American!");
}
</script>
<p>Are you getting old, are you?.</p>

<button onclick="myFunction1()">2</button>

<script>
function myFunction() {
confirm("Are you older than 24!");
}
</script>
<p>Are you Happy?.</p>

<button onclick="myFunction()">3</button>

<script>
function myFunction() {
confirm("Has today been a good day?");
}
</script>
<p>Do you have a middle name?.</p>

<button onclick="myFunction()">4</button>

<script>
function myFunction() {
confirm("I have a middle name!");
}
</script>
<p>Are you the oldest?.</p>

<button onclick="myFunction()">4</button>

<script>
function myFunction() {
confirm("yes!");
}
</script>

</body>
</html>
3 changes: 3 additions & 0 deletions lab-01/index.html-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
let myFUnction = function() {
console.log('hello world')
}
4 changes: 4 additions & 0 deletions lab-01/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
margin: 0 auto;
background-color: blue;
}
33 changes: 33 additions & 0 deletions lab-01/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
let name = prompt("what is your name?");
let country = prompt("What is your orgin?");
let age = prompt("how old are you?");
let food = prompt("what is your fravorite food?");
let language = prompt("What languages do you speak?");

let myArray = ['soccer', 'basketball', 'lakers'];
let emptyArray = [];
let checkHuman;

for(let i = 0; i < myArray.length; i++) {
checkHuman = confirm('Do you play ' + myArray[i]);
if(checkHuman) {
emptyArray.push(myArray[i]);
}
}

if(myArray === emptyArray) {
alert('Welcome Human');
}

if(name){
document.getElementById('userName').innerText = name;
}




console.log(name);
console.log(country);
console.log(age);
console.log(food);
console.log(language);
Empty file added lab-01/main.js-2
Empty file.
24 changes: 24 additions & 0 deletions lab-01/main2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
let myStore = {
product : 'chocolate cookies',
customers: 100,
employees: 3
location: 'Bethesda',
getproduct: function(){
console.log(this.product)
}
}

let id= document.getElementById('body')
body.innerText = 'Hello World'

let class = document.getElementsByClassName('myClass')
for(let i = 0; i < elClass.length; i++)
elClass



let elTable = document.createElement('table');
let elRow = document.createElement('tr')
elRow.textContent = objArray[i].name


126 changes: 126 additions & 0 deletions lab-01/main3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
function Store(name, location, product, customers){
this.storeName = name;
this.storeLoc = location;
this.storeProduct = products;
this.storeCustomers = customers;
}
let storeOne = new Store('Vanilla Store' , 'Baltimore' , 'Vanilla Cookies' , 200)
let storeTwo = new Store('Chocolate Store' , 'Bethesda' , 'Chocolate Cookies' , 100)

console.log(storeOne);
console.log(storeTwo);

Store.prototype.price = 10
Store.prototype.revenue = 0

Store.prototype.calRevenue = function() {
this.revenue = this.customers * this.price
}

console.log(storeOne)
console.log(storeTwo)



// let storeOne = {
// name: 'Chocolate Store',
// product : 'chocolate cookies',
// customers: 40,
// employees: 3,
// location: 'Bethesda',
// createCustomer: function() {
// this.customers += 100
// }
// }

// let storeTwo = {
// name: 'Vanilla Store',
// product : 'vanilla cookies',
// customers: 200,
// employees: 10,
// location: 'Baltimore',
// getProduct: function() {
// console.log(this.product)
// }
// }

// //array of objects
// let objArray = [storeOne, storeTwo]
// console.log = (storeOne)= 'Bethesda'
// console.log = (storeTwo)= 'Baltimore'
// //creating elements
// let elBody = document.getElementById('table-container')
// let elTable = document.createElement('table')

// //setting a class to the new table we just created
// elTable.setAttribute('id', 'id-table')

// //appending our table to the body
// elBody.appendChild(elTable)

// //looping through the array of objects
// for(let i = 0; i < objArray.length; i++) {
// let elRow = document.createElement('tr')
// elTable.appendChild(elRow)
// let elTh = document.createElement('th')
// elTh.innerText = objArray[i].name
// elRow.appendChild(elTh)
// let product = document.createElement('td')
// product.innerText = objArray[i].product
// elRow.appendChild(product)
// let location = document.createElement('td')
// location.innerText = objArray[i].location
// elRow.appendChild(location)


// // 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].customers
// // console.log(objArray[i].revenue)
// // console.log(objArray[i])
// }


// // storeTwo.hours = '9-5'

// // let myBody = document.getElementById('myBody')

// // let storeOneTitle = document.createElement('h1')
// // myBody.appendChild(storeOneTitle)
// // storeOneTitle.setAttribute('class', 'store')
// // storeOneTitle.innerText = storeOne.name

// // let storeOneLocation = document.createElement('p')
// // myBody.appendChild(storeOneLocation)
// // storeOneLocation.setAttribute('id', 'store-one-location')
// // storeOneLocation.innerText = storeOne.location

// // let storeOneCustomers = document.createElement('p')
// // myBody.appendChild(storeOneCustomers)
// // storeOneCustomers.innerText = `# of customers ${storeOne.customers} in ${storeOne.location}`
// // '# of customers ' + storeOne.customers






// // let heading = document.createElement('h1')
// // heading.setAttribute('class', 'newClass')
// // myBody.appendChild(heading)
// // heading.textContent = 'Heading'

// // console.log(heading)

// // let elClass = document.getElementsByClassName('myClass')
// // for(let i = 0; i < elClass.length; i++) {
// // elClass[i].textContent = 'Hello Again'
// // }

// // console.log(elClass)

// // let elId = document.getElementById('myId')
// // elId.innerText = 'Hello world'

Binary file added lab-01/steak.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.