What does this code Error?

const logCitySkyline = () => {
    
    return let  name='jenny';;
};
console.log(logCitySkyline());

You can’t declare a variable and return this value in one line/go.

either declare the variable first, and then return on the next line, or get rid of the variable deceleration altogether since its not really doing anything

1 Like