Skip to content

Commit

Permalink
"without modules" tutorial notes have taken
Browse files Browse the repository at this point in the history
  • Loading branch information
zbaharyilmaz committed Dec 18, 2024
1 parent d042c6b commit c6ca49b
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 0 deletions.
File renamed without changes
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions js-notları/modul/withoutModules/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
console.log("Selam app.");


document.querySelector("h1").textContent="without modules"



const products = [
{
name: "İphone15",
price: 2000,
},
{
name: "İphone14",
price: 1800,
},
{
name: "Samsung Galaxy",
price: 2500,
},
];


console.log(calculate(products));


//alt:üstteki sayfa alttakini görür.alttakinin üstekini görmesi için parametre göndermek gerekir.
12 changes: 12 additions & 0 deletions js-notları/modul/withoutModules/calculate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
console.log("Selam cal.");


let myName="ipek"
console.log(myName);

const calculate=(dizi)=>{
dizi.reduce((sum, product)=>sum+product.price,0)
}


//üst:üstteki sayfa alttakini görür.alttakinin üstekini görmesi için parametre göndermek gerekir.
14 changes: 14 additions & 0 deletions js-notları/modul/withoutModules/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

<h1>NO MODULE</h1>
<script src="./calculate.js"></script>
<script src="./app.js"></script>
</body>
</html>

0 comments on commit c6ca49b

Please sign in to comment.