You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Given a mixed array of number and string representations of integers, add up the string integers and subtract this from the total of the non-string integers.
//P: mixed array of number and string
//R: return add up the string integers and subtract this from the total of the non-string integers.
//E:
//P:
//sepearte krta
//map int mai conce
function divCon(x){
let x1= x.filter((e)=>typeof e==="number"?e:'').reduce((a,b)=>a+b,0)
// console.log(x1)
let x2= x.filter((e)=>typeof e==="string"?e:'').map((e)=>+e).reduce((a,b)=>a+b,0)