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

Big Letters چالش 5 از جلسه‌ی 2، سخت

کلمه در متغیر word است. دو چیز نشان بده:
- یک h1 با id برابر word که کلمه را با حروف بزرگ بنویسد: REACT
- یک p با id برابر len که بنویسد 5 letters

از toUpperCase() و length استفاده کن؛ عدد و کلمه را دستی ننویس.

<style>
body { font-family: sans-serif; text-align: center; padding: 16px; }
button, input, select { font-size: 16px; min-height: 40px; margin: 4px; }
</style>

<div id="root" dir="ltr"></div>

<script type="text/jsx">
import { createRoot } from "react-dom/client";

function App() {
  const word = "react";
  return (
    <div>
    </div>
  );
}

createRoot(document.getElementById("root")).render(<App />);
</script>

راهنما و جواب این چالش · برگشت به درس جلسه‌ی 2: JSX و آکولاد · چالش بعدی: Find the Bugs

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