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
16 changes: 11 additions & 5 deletions week-2/week-2-js/easy/findLargestElement.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
/*
  Write a function `findLargestElement` that takes an array of numbers and returns the largest element.
  Example:
  - Input: [3, 7, 2, 9, 1]
  - Output: 9
Write a function `findLargestElement` that takes an array of numbers and returns the largest element.
Example:
- Input: [3, 7, 2, 9, 1]
- Output: 9
*/

function findLargestElement(numbers) {

let max = numbers[0];

for (let i = 1; i < numbers.length; i++) {
if (numbers[i] > max)
max = numbers[i];
}
return max;
}

module.exports = findLargestElement;
4 changes: 2 additions & 2 deletions week-9/petAdoption/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions week-9/petAdoption/src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react'

const Header = () => {
import "./Header.css";
const Header = ({ message }) => {
return (
<div>Header</div>
<div className='header'>{message}</div>
)
}

Expand Down
26 changes: 24 additions & 2 deletions week-9/petAdoption/src/components/PetAdoptionForm.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
import React from 'react'

import "./petAdoptionForm.css"
const PetAdoptionForm = () => {
function submit() {

}
return (
<div>PetAdoptionForm</div>
<div className="container">
<div className="box">
<form className="forms">
Pet Name <br />
<input type="text" placeholder='Pet Name' />
Pet Type <br />
<input type="text" />
Breed <br />
<input type="text" />
Your Name <br />
<input type="text" />
Email <br />
<input type="email" />
Phone <br />
<input type="text" />
<button onclick={submit}>Submit</button>
</form>
</div>
</div>

)
}

Expand Down
12 changes: 12 additions & 0 deletions week-9/petAdoption/src/components/header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.header {
background-color: rgba(255, 165, 0, 0.4);
color: #1a3d1a;
font-weight: bold;
text-align: center;
padding: 8px;
font-size: 18px;

backdrop-filter: blur(1px);
width: 100%;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
33 changes: 33 additions & 0 deletions week-9/petAdoption/src/components/petAdoptionForm.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.box {
background-color: rgba(255, 165, 0, 0.4);
color: #1a3d1a;
font-weight: bold;
backdrop-filter: blur(1px);
width: 50vw;
}

.container {
display: flex;
justify-content: center;
}

input {
height: 2px;
margin-top: 1px;
margin-bottom: 2px;
}

.forms {
padding-left: 15px;
padding-right: 15px;

color: #1a3d1a;
font-weight: bold;
font-size: 10px;
}

button {
background-color: rgb(3, 64, 3);
color: aliceblue;
height: 3px;
}