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
* The function below should log the number 2, however it does not,
* see if you can fix it!
*
* The original issue was that a and b were set as string values so the result was oringinally "ab". I have taken the problem from replit and recreated it here in this JS file.
*
*/
function troubleshooting() {
const a = 1
const b = 1
return a + b // return command sends the answer between the brackets above. It doesn't matter that I have called it "answer" it works even if it is blank
}
console.log(troubleshooting()) // this is saying print out the returned value from the troubleshooting funtion, in this case the answer of 2