بتل کد Battle Codeدارد باز می‌شود…

Medal چالش 4 از جلسه‌ی 11، متوسط

امتیاز را از score بخوان و مدال را روی تابلو (board) بنویس:
- بزرگ‌تر از 90: Gold
- بزرگ‌تر از 50: Silver
- بقیه: Bronze
به ترتیب شرط‌ها دقت کن.

<style>
body { font-family: sans-serif; text-align: center; padding: 16px; }
button, input, select { font-size: 16px; min-height: 40px; margin: 4px; }
.board { font-size: 40px; width: 200px; margin: 12px auto; padding: 10px; border-radius: 12px; background: #e2e8f0; }
</style>

<div id="board" class="board">0</div>
<input id="score" placeholder="0 to 100">
<button id="go" onclick="press()">Go</button>

<script>
let board = document.getElementById("board");

function press() {

}
</script>

راهنما و جواب این چالش · برگشت به درس جلسه‌ی 11: وگرنه · چالش بعدی: Light by Word

بیشتر بخوان: جاوااسکریپت چیست؟ از دکمه‌ی وب تا Node.js