Need explanation on Error type!

What is mean ReferenceError: assignment to undeclared variable "x"
Sometimes I see it when I am doing a challenge !!!

when you assign value to a variable with out declaring it first
ex: x = 10; //undefined
var x = 10;//defined