JSFiddle - React, Tailwind, and code Playground
by rehankh
HTML
<!--
In this box you write your HTML
-->
<h2>jsFiddle is a great place<br>to deepen your knowledge.</h2>
<p>You write HTML, CSS, and JavaScript code in the appropriate boxes, then press <b>Run</b> in the horizontal menu above. If your code runs the way you expect it to, you're golden!</p>
<input type="button" id="messageButton" value="Click to test JavaScript">
CSS
/*
In this box you write your CSS
*/
h2 {
text-align: center;
}
p {
font-family: helvetica, arial, sans-serif;
}
JavaScript
/*
In this box you write your JavaScript. The most common way to test your code is to output a variable in an alert, as in this example.
*/
document.getElementById("messageButton").onclick = testCode;
function testCode() {
var cities = ["Akron", "Brooklyn", "Canton"];
alert("The number of cities in the array is "+citi es.length);
alert("The last city in the array is "+cities[cities.length-1]);
}