I'm new to JavaScript and wrote this short script to choose a random background color for the body of my page, but it only keeps executing the default case. I don't know what's the problem.
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<script>
function chC(){
var cl=document.getElementById('demo');
var colNo=Math.random()*4;
switch (colNo){
case 1:{
cl.style.background='red';
}
case 2:{
cl.style.background='yellow';
}
case 3:{
cl.style.background='pink';
}
default :{
cl.style.background='orange';
}
}
}
</script>
<title></title>
</head>
<body id="demo">
<button type="button" onclick="chC();">change</button>
</body>
</html>