<script> var ar = [-1, 8, 9, -4, 5, 3]; arM = ar.filter(a => a < 0); document.write(`${ar} минусов: ${arM.length} плюсов: ${ar.length - arM.length}`) </script>