Posting to forums on iOS gets rid of code formatting

So whenever I post my Javascript code to the forum I get told my code is formatted badly. Which confuses me because I swore I formatted it correctly on the lesson.

I’ve realised that when you click ‘ask for help’ and let that automatically post your code, the spacing added vanishes.

This,

function rangeOfNumbers(startNum, endNum) {
  if (startNum == endNum){
    return endNum;
} else {
  const arrNum = rangeOfNumbers ();
  arrNum.push();
  return arrNum;
  }
};
console.log(rangeOfNumbers(1, 5))

Ends up as this

function rangeOfNumbers(startNum, endNum) {
if (startNum == endNum){
return endNum;
} else {
const arrNum = rangeOfNumbers ();
arrNum.push();
return arrNum;
 }
};
console.log(rangeOfNumbers(1, 5))

Ignore my bad code, it is just to demonstrate the issue.

What are the specific device and browser versions?


I’d suggest opening an issue for it. Add as much information as you can to the issue.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.