I really think you'll be able to do what you are doing with Field Rules so much easier than Javascript - the field rules in the Modern Designer are so much more powerful than in the Classic Designer.
That said - here is some Javascript with a lot of detailed comments regarding how to work with LFForm.getFieldValues and values from a checkbox field. This was tested in Version 11.0.2311.50556.
//Let's assume we have a checkbox with variable
//of showWeeknd that has checkboxes for Saturday
//and Sunday.
LFForm.onFieldChange(function() {
//Variable declaration.
let isChecked = '';
//This should return an object with details from the checkbox.
//the console will show the following:
// no checks: an object with a child object named value (with 0 elements)
// Saturday checked: an object with a child object named value (with 1 elements)
// Sunday checked: an object with a child object named value (with 1 elements)
// Both checked: an object with a child object named value (with 2 elements)
isChecked = LFForm.getFieldValues({variableName: "showWeeknd"});
console.log('1: ');
console.log(isChecked);
//This should return an array of the values from the checkbox.
//the console will show the following:
// no checks: {empty string}
// Saturday checked: Saturday
// Sunday checked: Sunday
// Both checked: Saturday, Sunday
isChecked = LFForm.getFieldValues({variableName: "showWeeknd"}).value;
console.log('2: ' + isChecked);
//This should return the first value from the checkbox.
//the console will show the following:
// no checks: {undefined}
// Saturday checked: Saturday
// Sunday checked: Sunday
// Both checked: Saturday
isChecked = LFForm.getFieldValues({variableName: "showWeeknd"}).value[0];
console.log('3: ' + isChecked);
//This is the same as the second one, but will loop through
//each item in the array.
//the console will show the following:
// no checks: {does not run}
// Saturday checked: Saturday
// Sunday checked: Sunday
// Both checked: Saturday
// Sunday
isChecked = LFForm.getFieldValues({variableName: "showWeeknd"}).value;
isChecked.forEach(function(element) {
console.log('4: ' + element);
});
//Put a break into the log.
console.log('-----------------');
//End of LFForm.onFieldChange(function() {
}, {variableName: "showWeeknd"});