Day 2 PAH
Day 2 PAH
Step 1:
Step 2:
Greeting.jsx
function Greeting()
{
const name = "John";
const currentDate = new Date().toLocaleDateString(undefined, {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
});
return(
<div>
<h2>Hello, {name}!</h2>
<p>Welcome to our website. Today is {currentDate}.</p>
</div>
);
}
Step 3:
App.js
import './assets/css/App.css';
import Greeting from '.components/Greeting';
function App() {
return (
<div className="App">
<Greeting />
</div>
);
}
Step 4:
cd reactapp
npm install
npm audit fix (if any vulnerabilities came means type this)
npm start
Step 5:
close the new tab and open again by pressing Port 8081, you get the result
Step 6:
3. submit project
4. Submit Test