We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functionmain(){vari=4vard=4.0vars="HackerRank "// Declare second integer, double, and String variables.leti2;letd2;lets2;// Read and save an integer, double, and String to your variables.i2=Number(readLine())d2=Number(readLine())s2=readLine()// Print the sum of both integer variables on a new line.console.log(i+i2)// Print the sum of the double variables on a new line.console.log((d+d2).toFixed(1))// Concatenate and print the String variables on a new line// The 's' variable above should be printed first.console.log(s+s2)}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Data Types
You are viewing a single comment's thread. Return to all comments →
javascript