I have a very basic question: do I need to put the var’s string inside parenthesis? I’ve noticed that when I run the code, both of these two forms print correctly:
var favoriteFood = (‘pizza’);
var numOfSlices = (8);
var favoriteFood = ‘pizza’;
var numOfSlices = 8;
Not necessary. An assignment is not an argument, but an object reference.
Yes. However, consider using
let, and let
var slip into the oblivion that is the past.
Thanks! I’m planning on doing so, however it’s recommended to just learn what var was and the next part is to learn how to use const and let - thanks for the info and quick response!