Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing ECMAScript 6 const as Function Argument

Tags:

I've been reading a lot about ES6 lately and decied to give it a try (using Babel). I'm a little confused with new variable declarations let and const.

I understood how scope differs from var; and that const is a permanent reference to a value (and not a constant value itself!).

Q: What if I pass const variable to a function call? Will the receiving function be able to change the value / reference? Why? Why not?