const vs immutable variables

const vs immutable variables

What’s the difference between max1 and max2?

const max1 = 0xFF;

let max2 = 0xFF;

const is a sophisticated version of a #define

https://stackoverflow.com/questions/37877381/what-is-the-difference-between-immutable-and-const-variables-in-rust