Hi makenzi.exc,
Inside the Button Click event handler, an Array is defined and the CheckBoxes are referenced.
Finally, checked CheckBoxes values are displayed in JavaScript Alert Box.
Refer below example.
HTML
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body { font-family: Arial; font-size: 10pt; }
</style>
</head>
<body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("#btnSubmit").click(function () {
//Create an Array.
var fruits = new Array();
//Insert checked CheckBox value in Array.
$("input[type=checkbox]:checked").each(function () {
fruits.push($(this).val());
});
//Display the selected CheckBox values.
alert("Selected values: " + fruits.join(", "));
});
});
</script>
<input type="checkbox" id="chkMango" value="1" /><label for="chkMango">Mango</label>
<input type="checkbox" id="chkApple" value="2" /><label for="chkApple">Apple</label>
<input type="checkbox" id="chkOrange" value="3" /><label for="chkOrange">Orange</label>
<br /><br />
<input type="button" id="btnSubmit" value="Submit" />
</body>
</html>
Demo
Screenshot

Downloads
Download Sample