function findSum(arr) {
const arrSum = arr.map(subArr => subArr.flat(Infinity).reduce((subSum, item) => (subSum + item)));
return arrSum;
}
<div class="icon"></div>
.icon {
font-size: 100px;
border: 0.1em solid black;
border-radius: 50%;
display: inline-block;
width: 1em;
height: 1em;
position: relative;
transform: rotate(45deg);
}
.icon::before {
content: "";
display: inline-block;
position: absolute;
background: black;
width: 0.1em;
height: 100%;
left: 0.5em;
transform: translateX(-50%);
}
.popup__menu--active{
transition: background-color 1s ease;
}
$(function() {
$(window).resize(onRes);
onRes();
function onRes() {
if ($(window).width() <= 1050) {
$('.popup__list').on('click', 'a[href=""]', function(e) {
e.preventDefault();
$(this).next('.popup__submenu').slideToggle();
});
}
}
});