Step into programming Blog
As developers, we use a lot of boolean in our code, aren’t we? By the pieces of code below, we are going to do some experiments on casting(converting) boolean to a string. So enough...
Whenever you want to make a variable constant, in order to not be able to change(mutate) it through the program, then you gonna need to define the variable to const like this:
const familyName = "Daka";
// Now any try of changing the variable familyName will throw an error.
// I will try to change familyName varibale to the value of "newFamilyName" on the next line =>
familyName = "newFamilyName";