Would you like to check what wrong in my code, I have 2 group radio button when I click the radio button variable r not have a value :
<script>
$(document).ready(function() {
var s = 0;
var l = 0;
var r = 0;
$('input[type=radio][name="saverity"]').change(function() {
s = $(this).val();
console.log(s);
});
$('input[type=radio][name="likehood"]').change(function() {
l = $(this).val();
console.log(l);
});
r = s * l;
console.log(r);
});
Thank you very much.