Display Current Date and Time in JSX in ReactJs challenge

 Display Current Date and Time in JSX in ReactJs challenge

  1. Create a react app from scratch
  2. Add one h1 element ex. Your Name
  3. Add one p element in it with Current Date
  4. Add one p element in it with Current Time

import React from 'react';
import ReactDOM from 'react-dom';

const name = "shreyash kolhe";
const currentDate = new Date().toLocaleDateString();
const currentTime = new Date().toLocaleTimeString();

ReactDOM.render(
  <>
    <h1>{`Hello, My name is ${name}`}</h1>
    <p>{`Today Date is = ${currentDate}`}</p>
    <p>{`Current Time is =  ${currentTime}`}</p>
  </>
  document.getElementById("root")
);
OUTPUT