constat and html with JS
Sun Jun 18 2023 00:24:23 GMT+0000 (Coordinated Universal Time)
Saved by
@sarfraz_sheth
#react.js
var React = require("react");
var ReactDOM = require("react-dom");
const fname = "@Sarfraz";
const lname = "Sheth";
const CURRENT_DATE = new Date();
console.log(CURRENT_DATE);
const CURRENT_YEAR = CURRENT_DATE.getFullYear();
const img =
"https://imagesvc.meredithcorp.io/v3/mm/image?url=https%3A%2F%2Fpublic-assets.meredithcorp.io%2F8ad90d6a713d7ddf16a2c590fead64ea%2F1681363353410274244D1-FFEA-452C-B5F8-FB7CAF661309.jpeg&q=60&c=sc&orient=true&poi=auto&h=512";
ReactDOM.render(
<div>
<h1>Hello World {fname + " " + lname}</h1>
<p>All indroductory lessons are in this sandbox</p>
<h1 className="heading" contentEditable="true">
List Practice
</h1>
<ul>
<li>
Elemento 1 {fname} {lname}
</li>
<li>Elemento 2 {fname}</li>
<li>Elemento 3</li>
</ul>
<p>Copyright {CURRENT_YEAR}</p>
<h1>Image Practice </h1>
<img
className="img-page"
alt="this test"
src="https://images.immediate.co.uk/production/volatile/sites/30/2013/05/Puttanesca-fd5810c.jpg?quality=90&webp=true&resize=300,272"
/>
<br />
<img alt="this test" className="img-page" src={img} />
</div>,
document.getElementById("root")
);
content_copyCOPY
render with hetml injections with js constante variable. Additionally, it is described the style and class name usig camel case standard for html attributes.
Comments