screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.js"></script> <!---this is used to compile on run time---> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> </head> <body> <h3> React Js Rounded off Number</h3> <div id="app"></div> <script type="text/babel"> function App() { const number = 3.14159265359; const roundedNumber = number.toFixed(); return ( <div> <p>Number: {number}</p> <p>Rounded Roundoff Number: {roundedNumber}</p> </div> ); } ReactDOM.render(<App />, document.getElementById('app')); </script> </body> </html>