The document discusses code maintenance and provides seven meditations or lessons on the topic. The lessons include naming things properly, avoiding clever code, commenting code, being deliberate, being consistent, understanding tools and costs, and that what developers do through code maintenance is important. The document emphasizes writing usable, scalable and maintainable code through these lessons and meditations.
20. “…only a programmer will avoid writing
monotonous, repetitive code”
LAZY
-Phillip Lessen
21. function count() {
}
console.log(‘1’);
Write a function
that counts to
console.log(‘2’);
console.log(‘3’);
console.log(‘4’);
console.log(‘5’);
console.log(‘6’);
console.log(‘7’);
console.log(‘8’);
console.log(‘9’);
console.log(’10’);
10
22. function count() {
for (let i = 1; i <= 10; i++) {
console.log(i);
}
}
Write a function
that counts to
10
23. function count(max) {
for (let i = 1; i <= max; i++) {
console.log(i);
}
}
Write a function
that counts to
10
L A
Z
Y
000