<div id='t'>
 
</div>
div{
  
  font-size:30px;
}
$(document).ready(function() {
  //вот здесь меняем значения смотрим результат
  var roofmat = 2;
  var roofpt = 1;
  var Price2 = 0;
  
  let result = 
      (roofpt && 5500)||
      (roofmat == 1 && 7900) ||
      (roofmat == 2 && 8900) ||
      0 ;
  
  
  $("#t").html(result);

  // собссно ф-ция
  function getPrice() {
    return (
      (!parseInt(roofpt) && 5500) ||
      (roofmat == 1 && 7900) ||
      (roofmat == 2 && 8900) ||
      0
    );
  }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js