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 modified README.md
Binary file not shown.
35 changes: 34 additions & 1 deletion challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ Output: "The late fee is $2.50."

// ✍️ ✍️ ✍️ ✍️ Write the function here ✍️ ✍️ ✍️ ✍️

function calculateLateFee() {
const numberDays=prompt("how many days u made late?")
const priceDays=0.25
const total=numberDays*priceDays
console.log(`the total price is ${total}`)}

calculateLateFee()


// Extra Task:
Expand All @@ -44,6 +51,19 @@ Output: "Red: You are passionate and bold."
*/

// ✍️ ✍️ ✍️ ✍️ Write the function here ✍️ ✍️ ✍️ ✍️
function findColorMeaning(){
const color=prompt("which color do you like?")

if(color=="green"){console.log('You are connected to nature.')}
else if(color=="blue"){console.log('You are passionate and bold.')}
else if(color=="yallow"){console.log('You radiate happiness and energy.')}
else if(color=="red"){console.log('You are passionate and bold.')}

else {console.log('That is a unique choice!')
}
}

findColorMeaning()



Expand All @@ -67,6 +87,11 @@ Output: "Case #12345: John Doe's case is now logged."
*/

// ✍️ ✍️ ✍️ ✍️ Write the function here ✍️ ✍️ ✍️ ✍️
function logCase(caseNumber,clientName){
console.log(`his name is ${caseNumber},and his number is ${clientName}`)
}
logCase("salah",1234)




Expand All @@ -92,7 +117,15 @@ Input: markAttendance("Amina", true)
Output: "Amina is present."
*/

// ✍️ ✍️ ✍️ ✍️ Write the function here ✍️ ✍️ ✍️ ✍️
// ✍️ ✍️ ✍️ ✍️ Write the function here ✍️ ✍️ ✍️

function markAttendance(studentName,isPresent)
{ if (studentName){console.log(`${studentName} is present.`)
}
else {console.log(`${studentName}is absent`);}
};
markAttendance()




Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
</head>
<body>
<h1>Check the console log for changes</h1>

<script src="challenges.js"></script>
</body>
</html>