Explain the difference between var, let, and const.

var has function scope and is hoisted. let and const have block scope; let allows reassignment, while const does not allow reassignment or redeclaration.

var x = 5; // Function-scoped
let y = 10; // Block-scoped, reassignable
const z = 15; // Block-scoped, cannot be reassigned