Sort by

recency

|

264 Discussions

|

  • + 0 comments

    console.log(firstInteger + +secondInteger) console.log(firstDecimal + +secondDecimal) console.log(firstString + secondString)

  • + 0 comments

    function performOperation(secondInteger, secondDecimal, secondString) { const firstInteger = 4; const firstDecimal = 4.0; const firstString = 'HackerRank ';

    const sumIntegers = firstInteger + Number(secondInteger);
    console.log(sumIntegers);
    
    const sumDecimals = firstDecimal + Number(secondDecimal);
    console.log(sumDecimals);
    
    const concatenatedString = firstString + secondString;
    console.log(concatenatedString);
    

    }

  • + 0 comments

    console.log(parseInt(secondInteger) + firstInteger); console.log(parseFloat(secondDecimal) + firstDecimal) console.log(firstString + secondString);

    `

  • + 0 comments

    I have to be missing something pretty obvious because it says I've passed test case 0 but I'm failed test case 1 and test case 2. However, I'm not even seeing a test case 1 or 2.

    What am I missing?

  • + 0 comments
     // Write code that uses console.log to print the sum of the 'firstInteger' and 'secondInteger' (converted to a Number type) on a new line.
     
           console.log(firstInteger + Number(secondInteger))
        
        // Write code that uses console.log to print the sum of 'firstDecimal' and 'secondDecimal' (converted to a Number  type) on a new line.
    		
        console.log(firstDecimal + Number(secondDecimal))
        
        // Write code that uses console.log to print the concatenation of 'firstString' and 'secondString' on a new line. The        variable 'firstString' must be printed first.
        console.log(firstString + secondString)