title: Javascript return correct value for checkbox using each()
body: <p>i try to return some amount when user click checkbox and do some calculation.
  But the result always return wrong value if i try to check two checkbox.</p>
  
  <pre><code>$('.type_checkbox input[type="checkbox"]').each(function (index) {
  
      if ($(this).is(':checked')) {
              checkbox_price_prefix = $(this).data('prefix-checkbox');
              checkbox_price = checkbox_price_prefix + $(this).data('price-checkbox');   // &lt;----- += or =
      }
  });
  </code></pre>
  
  <p>You can try <a href="https://jsfiddle.net/ruslyrossi/so7c7xtm/1/" rel="nofollow">HERE</a></p>
  
  <p>The problem is when user try to check type A and type B, the result suppose to be RM90</p>