Javascript example to get comma separated checked value from multi checkbox

Below are the example about how to get comma saperated value of selected checkbox through javascript function.