let toggleButton = document.getElementById("togbut");
let s1 = document.getElementById("s1").style.backgroundColor;
let s2 = document.getElementById("s2").style.backgroundColor;
let s3 = document.getElementById("s3").style.backgroundColor;
function changeColor() {
s1 = "white";
s2 = "white";
s3 = "white";
}
toggleButton.onmouseover = changeColor;
<body>
<div>
<div class="toggle-button" id="togbut">
<span id="s1"></span>
<span id="s2"></span>
<span id="s3"></span>
</div>
<ul class="sidebar">
<li>Menu</li>
<li><a href="/">Main</li>
<li><a href="/">About us</li>
</ul>
</div>
<script src="scripts/menu.js"></script>
</body>