Daily Coding Challenge - Flattened

Tell us what’s happening:

It says syntax error: expected “(” at line 2:5 (right before the ‘isFlat’)

Your code so far

function isFlat(arr) {
  if isFlat(arr):
    return arr;
}
isFlat([1, 2, 3, 4])

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0

Challenge Information:

Daily Coding Challenge - Flattened

https://www.freecodecamp.org/learn/daily-coding-challenge/2026-03-01

Wait sorry my mistake there’s no in-built isflat function

And I was doing it in Javascript not Python like I thought I was.