What does "referenceerror: invalid left-hand side in assignment" mean in javascript?

Example:

5 = x;

This error indicates an invalid assignment, usually because the left-hand side isn't a valid target for assignment.

Solution: Correct the assignment so the left side is a valid variable.

let x = 5;

Beginner's Guide to JavaScript