Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continue study arrays #25

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion 01_Fundamentals_Javascript/starter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<title>Document</title>
</head>
<body>

<h3>Hello World</h3>
<h2>lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje lorem laksd kl kasn zxlkj j oqiwueqo iiwj lnlkjqlkjwlkjqlheqwe ij qlkwje </h2>


</body>
<script src="./challenge.js"></script>
Expand Down
65 changes: 39 additions & 26 deletions 06_Functions/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Function</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.min.css" rel="stylesheet" type="text/css" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.min.css"
rel="stylesheet"
type="text/css"
/>
<script src="https://cdn.tailwindcss.com"></script>
</head>

<body style="background-color: rgb(22, 46, 90);">
<h2 class="text-slate-300">Function</h2>

<input id="personName" type="text" placeholder="Person Name" class="input input-bordered w-full max-w-xs" />
<input id="amount" type="number" placeholder="Amount" class="input input-bordered w-full max-w-xs" />


<button id="cars"
class="rentals px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80">
Add Car
</head>

<body style="background-color: rgb(22, 46, 90)">
<h2 class="text-slate-300 h2">Function</h2>

<input
id="personName"
type="text"
placeholder="Person Name"
class="input input-bordered w-full max-w-xs"
/>
<input
id="amount"
type="number"
placeholder="Amount"
class="input input-bordered w-full max-w-xs"
/>

<button
id="cars"
class="rentals px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80"
>
Add Car
</button>
<button id="pool"
class="rentals px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80">
Answer Pool
<button
id="pool"
class="rentals px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80"
>
Answer Pool
</button>


</body>
<script src="./main.js"></script>

</html>
</body>
<script src="./main.js"></script>
</html>
42 changes: 42 additions & 0 deletions 06_Functions/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
"use strict";

// Start Learning Functions
// Coding Challenge
(function () {
const header = document.querySelector("h2");
header.style.color = "red";

document.querySelector("body").addEventListener("click", function () {});
})();

// Closure in functions
//TODO: Review Closure
// Make a function named washPlate that accept 2 arguments
// 1. n = number of plates
// 2. wait = time before washing
// Devide the plate by 4 groups
// Display in string format after (wait) seconds
// "I am now washing (n) of plates. There are 4 groups, each group are (membersCount)"

// const washPlate = function (n, wait) {
// let membersCount = n / 4;
// setTimeout(function () {
// console.log(
// `I have washed ${n} plates.\nThere are 4 groups of plate, each group are ${membersCount}`
// );
// }, wait * 1000);

// console.log(`Wait for ${wait} seconds to finish washing the plates`);
// };
// // const membersCount = 90;
// // washPlate(200, 3);

// Accessi1ng all the variable from its parents
// const parentFunc = function () {
// let b = 100;
// return function () {
// b++;
// console.log(b);
// };
// };

// const newFunc = parentFunc();
// newFunc();
// newFunc();

// CODING CHALLENGE DONE - USING CALL METHOD
// const poll = {
Expand Down
Binary file added 07_Array_methods/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions 07_Array_methods/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="shortcut icon" type="image/png" href="/icon.png" />

<link
href="https://fonts.googleapis.com/css?family=Poppins:400,500,600&display=swap"
rel="stylesheet"
/>

<link rel="stylesheet" href="style.css" />
<title>Bankist</title>
</head>
<body>
<!-- TOP NAVIGATION -->
<nav>
<p class="welcome">Log in to get started</p>
<img src="logo.png" alt="Logo" class="logo" />
<form class="login">
<input
type="text"
placeholder="user"
class="login__input login__input--user"
/>
<!-- In practice, use type="password" -->
<input
type="text"
placeholder="PIN"
maxlength="4"
class="login__input login__input--pin"
/>
<button class="login__btn">&rarr;</button>
</form>
</nav>

<main class="app">
<!-- BALANCE -->
<div class="balance">
<div>
<p class="balance__label">Current balance</p>
<p class="balance__date">
As of <span class="date">05/03/2037</span>
</p>
</div>
<p class="balance__value">0000€</p>
</div>

<!-- MOVEMENTS -->
<div class="movements">
<div class="movements__row">
<div class="movements__type movements__type--deposit">2 deposit</div>
<div class="movements__date">3 days ago</div>
<div class="movements__value">4 000€</div>
</div>

<div class="movements__row">
<div class="movements__type movements__type--withdrawal">
1 withdrawal
</div>
<div class="movements__date">24/01/2037</div>
<div class="movements__value">-378€</div>
</div>
</div>

<!-- SUMMARY -->
<div class="summary">
<p class="summary__label">In</p>
<p class="summary__value summary__value--in">0000€</p>
<p class="summary__label">Out</p>
<p class="summary__value summary__value--out">0000€</p>
<p class="summary__label">Interest</p>
<p class="summary__value summary__value--interest">0000€</p>
<button class="btn--sort">&downarrow; SORT</button>
</div>

<!-- OPERATION: TRANSFERS -->
<div class="operation operation--transfer">
<h2>Transfer money</h2>
<form class="form form--transfer">
<input type="text" class="form__input form__input--to" />
<input type="number" class="form__input form__input--amount" />
<button class="form__btn form__btn--transfer">&rarr;</button>
<label class="form__label">Transfer to</label>
<label class="form__label">Amount</label>
</form>
</div>

<!-- OPERATION: LOAN -->
<div class="operation operation--loan">
<h2>Request loan</h2>
<form class="form form--loan">
<input type="number" class="form__input form__input--loan-amount" />
<button class="form__btn form__btn--loan">&rarr;</button>
<label class="form__label form__label--loan">Amount</label>
</form>
</div>

<!-- OPERATION: CLOSE -->
<div class="operation operation--close">
<h2>Close account</h2>
<form class="form form--close">
<input type="text" class="form__input form__input--user" />
<input
type="password"
maxlength="6"
class="form__input form__input--pin"
/>
<button class="form__btn form__btn--close">&rarr;</button>
<label class="form__label">Confirm user</label>
<label class="form__label">Confirm PIN</label>
</form>
</div>

<!-- LOGOUT TIMER -->
<p class="logout-timer">
You will be logged out in <span class="timer">05:00</span>
</p>
</main>

<!-- <footer>
&copy; by Jonas Schmedtmann. Don't claim as your own :)
</footer> -->

<script src="main.js"></script>
</body>
</html>
Binary file added 07_Array_methods/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading