From b8f9634f3f85e936d819374254e55982f1bf8b0f Mon Sep 17 00:00:00 2001 From: VAMAN ACHARYA Date: Mon, 1 Jan 2024 13:48:54 +0530 Subject: [PATCH] Update transcript.js Added comments for naming of the variables --- Ch02/02_01/transcript.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ch02/02_01/transcript.js b/Ch02/02_01/transcript.js index c64b815..9040996 100755 --- a/Ch02/02_01/transcript.js +++ b/Ch02/02_01/transcript.js @@ -1,5 +1,10 @@ // This is a transcript of the lines of code from the lesson. // You can copy and paste each line into a JavaScript console to execute it and see the result. +// Naming variables + // Variable names are pretty flexible as long as you follow a few rules: + // Start them with a letter, underscore _, or dollar sign $. + // After the first letter, you can use numbers, as well as letters, underscores, or dollar signs. + // Don’t use any of JavaScript’s reserved keywords. var x = 32; x; @@ -19,4 +24,4 @@ monster3; // More info: -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var \ No newline at end of file +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var