Code to Display an array as a table in the console:
<script> // Display an array as a table in the console console.table({firstname:"John", lastname:"Doe"}); </script>
Code to Display a button:
<button>BUTTON</button>
Code to Display a css link using versioning:
<link rel="stylesheet" href="css/global-styles.css?v=6">
Code to Display a back button:
<button onclick="goBack()"> Go Back </button> <script> function goBack() { window.history.back() } </script>
Code to Display an arrow function:
<script> const sumNumbers = number => number + number </script>
Code to generate a random number then display it on the page:
<p> The random number is: <span id="demo"></span></p> <script> document.getElementById("demo").innerHTML = Math.floor(Math.random() * 1000000); </script>