Basic JavaScript - Constructing Strings with Variables

const ourName = "freeCodeCamp";
const ourStr = "Hello, our name is " + ourName + ", how are you?";

const key is used above but still we are able to reassign value to it.How?

I’m not seeing any “reassignment” in this example. The value of ourName is set once and the value of ourStr is set once. The value of ourName is referenced, but not reassigned.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.