Challenge 9 Differences between var and let keyword

In Challenge 9 of the JavaScript Certification:

var camper = "James";
var camper = "David";
console.log(camper);

is the third line the var declaration?

the first and second lines are var declarations, the second variable will overwrite first one without any error, if you replace var with let then js engine will complain that the camper is already declared

what is the third line written on the code above for though?

It is a console.log statement.

why

var camper = "James";
var camper = "David";
console.log(camper);

cannot be overridden by let keyword because it shows an error?
but the code below:

var catName = "Oliver";
var catSound = "Meow!";

can be overridden by the let keyword without errors?

You cannot re-declare the same variable twice in the same scope with let.

As a general rule, you should never use var.