JSFiddle - React, Tailwind, and code Playground

by 3rror404

HTML

<html>
  <head>
    <script>
      function myTask1() {
        var sentence = prompt("Please enter a name");
        var arrSentence = sentence.split(" ");
        if (arrSentence != null) {
          document.getElementById("answer1").innerHTML = arrSentence.sort(); //so we can use Array.sort() function 
        }
        console.log(sentence);
        return sentence;
      }

      function myFunction() {
        var x = document.getElementById()
      }

    </script>
    <style> </style>
  </head>

  <body>
    <p><button type="button" onclick="myTask1()">Click me!</button></p> 
    <button type="button" onclick="ClearFields();">Clear</button> 
    <button type="button" onclick="myFunction()"> --> </button> 
    <button type="button" onclick="myTask4()"><-- </button> 
      <div clas="box" style="background-color:red; height:200px; margin:20px auto;">
        <center>
          <p id="answer1"></p>
          <center>
        </div>
        <div class="box1" style="background-color:grey; height:200px; margin:20px auto;"> </div>
  </body>
</html>