title: Create a cruise ticket price calculator
body: <p>I am new to JavaScript. I want to make a Cruise ship ticket price calculator based on these information. I have tried to make it but I don't know much about JavaScript so I got confused what to do. If anyone helps me to find out what I should write on the Script it'll be so helpfull.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> &lt;script type="text/javascript"&gt;
      var island = document.getRBtnName("island").value;
      var returnfare = document.getElementByName("returnfare").value;
      var class = document.getRBtnName("class").value;
      function myFunction() {
          document.getElementById("inserts")= island * class * returnfare;
      } 
      &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form id="buy"&gt;
            &lt;label id="radiolabel"&gt;
              &lt;input type="radio" name="island" value="49"&gt;
              Main Beach - Azkaban Island&lt;/label&gt;
            &lt;br&gt;
            &lt;label id="radiolabel"&gt;
              &lt;input type="radio" name="island" value="79"&gt;
              Main Beach - Amity Island &lt;/label&gt;
            &lt;br&gt;
            &lt;label id="radiolabel"&gt;
              &lt;input type="radio" name="island" value="109"&gt;
              Main Beach - Treasure Island &lt;/label&gt;
            &lt;br&gt;
            &lt;label id="radiolabel"&gt;
              &lt;input type="radio" name="island" value="89"&gt;
              Main Beach - Gilligan’s Island&lt;/label&gt;
            &lt;br&gt;
            &lt;label id="radiolabel"&gt;
              &lt;input type="radio" name="island" value="59"&gt;
              Main Beach - Skull Island&lt;/label&gt;
            &lt;br&gt;
            &lt;p&gt;Click here if you will be purchasing a return fare
              &lt;input type="checkbox" name="returnfare" id="returnfare" value="2"&gt;
            &lt;/p&gt;
            &lt;label&gt;
              &lt;input type="radio" value="2.5" name="class"&gt;
              First class &lt;/label&gt;
            &lt;br&gt;
            &lt;label&gt;
              &lt;input type="radio" value="1.5" name="class"&gt;
              Business class &lt;/label&gt;
            &lt;br&gt;
            &lt;label&gt;
              &lt;input type="radio" value="0" name="class"&gt;
              Economy class&lt;/label&gt;
            &lt;br&gt;
            &lt;br&gt;
            &lt;input type="submit" name="submit" value="Calculate" id="calculate" onClick="myFunction()"&gt;
            &lt;input type="reset" name="reset" value="Reset"&gt;
          &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>