How to get all checked checkbox value in JavaScript and put it into the variable “result”?

My task is to do a test and use the alert command to show the number of points scored. So one of the questions involves checkboxes, several of which are correct and have a value of “1”. Accordingly, incorrect ones have the value “-1”. Here’s the code:

<p>
<label for="smth">What kinds of weather are <strong>the 
deadliest</strong>?</label><br>
<label> <input type="checkbox" name = "weather" value="1" id="h"> Heat <br> </label>
<label> <input type="checkbox" name = "weather" value="1" id="f"> Flooding <br> </label>
<label> <input type="checkbox" name = "smth" value="-1" id="t"> Thunder <br> </label>
<label> <input type="checkbox" name = "smth" value="-1" id="w"> Wind <br> </label>
</p>

How should I display the value through the alert command if the beginning of the code
function calculate(){
var result = 0
and result is a variable into which the values are added and which will be output as alert(result). I am a student and a beginner and therefore I strongly ask for a not very complex code in the answer. Thank you!