Ad
  • Default User Avatar

    put

    console.log(n[i])
    

    before the if statement in your for loop

  • Default User Avatar

    Ah, I wonder if it is any different now as I made an attempt with the code I was using prior.

    Sorry, I'm still figuring out how this works!

  • Default User Avatar

    @Doperoni

    when I try clicking on the View Solution button, all I saw was this:

    function positiveSum(arr) {
      
    }
    
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Unfortunately, none of that seems to be of any help. :(

    All I get from the test output is "expected +0 to equal 15."
    Which I am assuming is saying that the first test does not equal 15.
    It seems to work in my replit compiler though.

  • Default User Avatar

    read the test output, read the example test code, use console.log

  • Default User Avatar

    I am wondering if there is anybody who can look over the code that I have? I've been testing it on an online replit js compiler and it seems to work as the function asks. However, everytime I make an attempt it fails.

    Maybe it's because I'm using the "..." rest operator?

    Sorry, I am very new to this and don't have anybody I can ask inrl.

    I didn't want to post my code publically to avoid spoilers.