Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

4.4.2.2. Good Variable Names¶

/*Variable names should be descriptive, providing context about the data
they contain and how they will be used.*/

let radiusOfCircle = 5;
const pi = 3.14;
let areaOfCircle = pi * radiusOfCircle ** 2;
console.log(areaOfCircle);

/*TIP:
When considering program readability, think about whether or not your 
code will make sense to another programmer. It is not enough for code 
to be readable by only the programmer that originally wrote it.*/
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Good #Variable
ADD COMMENT
Topic
Name
3+9 =