Retired

Second Biggest and Second Lowest Sum (retired)

Description:

Write a function that returns sum of second biggest and second lowest number of Array.

Array may includes Not a Numbers, or String numbers(!), you should ignore them.

If the sum is NaN return 0.

if in Array just one value and it is a Number you should return this number
if its Not a Number return 0

arr = [1,5,87,45,8,8]
sum is 45 + 5 = 50
arr = ['str',3,5,7,2,'6']
sum is 3 + 5 = 8
because '6' is a string! And 'str' is also a string so they are both doesn't count
arr = [42]
return 42
arr = ['4'] or ['4','a']
return 0
Fundamentals

Stats:

CreatedJun 10, 2022
Warriors Trained20
Total Skips0
Total Code Submissions78
Total Times Completed17
JavaScript Completions17
Total Stars0
% of votes with a positive feedback rating38% of 12
Total "Very Satisfied" Votes3
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes6
Total Rank Assessments12
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ilyushal33t Avatar
Ad