-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
583 additions
and
27 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
console.log("Anna"); | ||
|
||
export const film = Object.freeze({ | ||
name: "Intimacy", | ||
director: "Verónica Fernández", | ||
releaseDate: 2022, | ||
genre: ["Crime", "Drama"] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"use strict"; | ||
|
||
|
||
let products = [ | ||
{ | ||
name: "macbook pro", | ||
category: "laptop", | ||
price: 1200, | ||
brand: "Apple", | ||
image: "" | ||
}, | ||
{ | ||
name: "iPhone 13 Pro Max", | ||
category: "smartphone", | ||
price: 1000, | ||
brand: "Apple", | ||
image: "https://external.webstorage.gr/mmimages/image/51/65/7/93/1641088-264x264-800x800-96x96-560x560.jpg" | ||
}, | ||
{ | ||
name: "Logitech MX Keys", | ||
category: "gadget", | ||
price: 120, | ||
brand: "Logitech", | ||
image:"https://resource.logitech.com/w_692,c_lpad,ar_4:3,q_auto,f_auto,dpr_1.0/d_transparent.gif/content/dam/logitech/en/products/keyboards/mx-keys-s/product-gallery/graphite/mx-keys-s-keyboard-top-view-graphite-us-intl.png?v=1" | ||
}] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// //console.log ("Alex"); | ||
// //console.log ("======================"); | ||
// const str = "Hello World"; | ||
// const str2 = str; | ||
// const num = 99; | ||
// const num2 = num; | ||
|
||
// //console.log(str,str2); | ||
// //console.log(num,num2); | ||
|
||
// const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | ||
// const arr2 = arr.unshift(0); | ||
|
||
// //console.log(arr, arr2); | ||
|
||
// const obj = { | ||
// valuex: 1, | ||
// valuey: 2, | ||
// valuez: 3, | ||
// } | ||
|
||
// const obj2 = obj; | ||
// obj2.valuex = 0; | ||
|
||
// const test = function (obj, obj2) { | ||
// //console.log(obj.valuex, obj2.valuex); | ||
// } | ||
|
||
// const test2 = test; | ||
|
||
// test(obj, obj2); | ||
// test2(obj, obj2); | ||
|
||
//console.log ("======================"); | ||
|
||
const howOldHelper = function () { | ||
const currentYear = new Date().getFullYear(); | ||
return currentYear - this.releaseDate; | ||
} | ||
|
||
export const film = Object.freeze( { | ||
name: "The Matrix", | ||
director: "Wachowski", | ||
releaseDate: 1999, | ||
genre: ["Sci-Fi"], | ||
howOld: howOldhelper, | ||
}) | ||
|
||
const film2 = Object.freeze( { | ||
name: "", | ||
director: "Wachowski 2", | ||
releaseDate: 2003, | ||
genre: ["Action", "Sci-Fi"], | ||
}) | ||
|
||
consol.log(film.howOld()); | ||
consol.log(film2.howOld()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" > | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>02.02.2024.Objects</title> | ||
|
||
|
||
</head> | ||
<body> | ||
<!-- partial:index.partial.html --> | ||
|
||
<!-- partial --> | ||
<script src="./script.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
"use strict"; | ||
// @ts-check | ||
// console.log("kostas!"); | ||
const person = { | ||
name: "", | ||
age: 0 | ||
} | ||
|
||
const john = person; | ||
john.name = "john"; | ||
john.age = 42; | ||
|
||
const defaultOptions = { | ||
color: "black", | ||
bg: "white" | ||
} | ||
|
||
const appOptions = { ...defaultOptions } | ||
appOptions.color = "white"; | ||
appOptions.bg = "black"; | ||
|
||
function howOldHelper(){ | ||
const currentDate = new Date(); | ||
const currentYear = currentDate.getFullYear(); | ||
return currentYear - this.releaseDate; | ||
} | ||
|
||
export const film = { | ||
name: "Poor Things", | ||
director: "Yorgos Lanthimos", | ||
releaseDate: 2024, | ||
genre: ["Drama"], | ||
// Once we are inside a method (an object property that has a function as a value) AND the method is declared using the 'function' keyword, (rule #2) then 'this' refers to the object containing the method. | ||
howOld: howOldHelper | ||
} | ||
const th = { | ||
name: "The Holdovers", | ||
director: "Alexander Payne", | ||
releaseDate: 1985, | ||
genre: ["Comedy","Drama"], | ||
howOld: howOldHelper | ||
} | ||
console.log( film.howOld() ) | ||
console.log( th.howOld() ) | ||
|
||
// const films = [ pt, th ] | ||
// Film Function Creator: | ||
function Film(name,director,releaseData,genre){ | ||
// Return a frozen version? | ||
return { | ||
name, | ||
director, | ||
releaseDate, | ||
genre, | ||
howOld: howOldHelper | ||
} | ||
} | ||
const tm = Film("The Matrix", "Wachowski", 1999, ["Sci-fi"]); | ||
console.log(tm.name, tm.howOld()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const coder = "Leon the couch coder 😂"; | ||
const magicccccoder = coder; | ||
|
||
console.log("coder:" + coder, "magicccccoder:" + magicccccoder); | ||
|
||
const taekanamadara = () => { | ||
return "taekanamadara"; | ||
} | ||
|
||
const dentaekanamadara = taekanamadara(); | ||
|
||
console.log(taekanamadara(), dentaekanamadara) | ||
|
||
|
||
const denkatalavainotipota = { | ||
dentapairnei: "des ta xalia mou" | ||
} | ||
|
||
denkatalavainotipota.dentapairnei = JSON.stringify(denkatalavainotipota); | ||
|
||
const katalavainei = denkatalavainotipota.dentapairnei; | ||
|
||
console.log(denkatalavainotipota, katalavainei); | ||
|
||
|
||
|
||
|
||
export const film = Object.freeze({ | ||
name: "Mitsotakis", | ||
director: "Hell", | ||
releaseDate: 1, | ||
genre: ["foreverstupidness"] | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
console.log("Mary") | ||
const firstName = "Mary"; | ||
const lastName = "Richelle"; | ||
const fullName = firstName + lastName; | ||
|
||
const maryObj = { | ||
livesIn: "Greece", | ||
hobby: "coding", | ||
does: ["eat","code","sleep","repeat"] | ||
} | ||
const myData = [firstName , lastName , fullName, maryObj.livesIn , maryObj.hobby] | ||
|
||
|
||
const aboutMe = (livesIn)=>{ | ||
console.log(fullName + " lives in " + livesIn) | ||
|
||
} | ||
aboutMe(maryObj.livesIn) | ||
myData.push(maryObj.does) | ||
|
||
export const film = Object.freeze({ | ||
name: "Wish", | ||
director: "Chris Buck", | ||
releaseDate: 2024, | ||
genre: ["Animation","Family","Fantasy","Adventure"] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// console.log("özgür") | ||
|
||
// const obj = { name: "özgür", age: "33" } | ||
// const arr = [12, 34, , 45, 2332, 5656] | ||
// const arr2 = arr.pop(); | ||
// // Think about: what is the value of arr2 now? | ||
// // What type? | ||
// const arr3 = arr2.push("I don't quite understand what we should do") | ||
// console.log(arr3) | ||
export const film = { | ||
name: "The 300 Spartans", | ||
director: "Zack Snyder", | ||
releaseDate: 2007, | ||
genre: ["History", "Action"] | ||
} | ||
Object.freeze(film) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>replit</title> | ||
<link href="style.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
|
||
<body> | ||
product list | ||
|
||
<div class="products"> | ||
<!-- <div class="product"> | ||
<img src="https://cdn.shopify.com/s/files/1/0509/6095/7594/products/Brown_Bear_1200x1200.jpg?v=1612740879" alt="product 1" /> | ||
<h3>Product 1</h3> | ||
<p>Description of product 1</p> | ||
<button>Add to Cart</button> | ||
</div> --> | ||
</div> | ||
<!-- <script src="script.js" type="module"></script> --> | ||
<script src="products.js" type="module"></script> | ||
<!-- | ||
<script src="mary.js" type="module"></script> | ||
<script src="ozgur.js" type="module"></script> | ||
<script src="alex.js" type="module"></script> | ||
<script src="leon.js" type="module"></script> | ||
<script src="Anna.js" type="module"></script> --> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"use strict"; | ||
|
||
|
||
let products = [ | ||
{ | ||
name: "macbook pro", | ||
category: "laptop", | ||
price: 1200, | ||
brand: "Apple", | ||
image: "" | ||
}, | ||
{ | ||
name: "iPhone 13 Pro Max", | ||
category: "smartphone", | ||
price: 1000, | ||
brand: "Apple", | ||
image: "https://external.webstorage.gr/mmimages/image/51/65/7/93/1641088-264x264-800x800-96x96-560x560.jpg" | ||
}, | ||
{ | ||
name: "Logitech MX Keys", | ||
category: "gadget", | ||
price: 120, | ||
brand: "Logitech", | ||
image: "https://resource.logitech.com/w_692,c_lpad,ar_4:3,q_auto,f_auto,dpr_1.0/d_transparent.gif/content/dam/logitech/en/products/keyboards/mx-keys-s/product-gallery/graphite/mx-keys-s-keyboard-top-view-graphite-us-intl.png?v=1" | ||
}] | ||
|
||
|
||
consol.log(document.getElementById("products")) | ||
// document.getElementById("products").innerHTML = products.map(product => ` | ||
|
||
// <div class="product"> | ||
|
||
// <img src="${product.image}" alt="${product.name}"> | ||
// <h3>${product.name}</h3> | ||
// <p>${product.category}</p> | ||
// <p>${product.price}</p> | ||
// <p>${product.brand}</p> | ||
// `) |
Oops, something went wrong.