Issue Description
Page 14 of the JavaScript Note (fundamentals.md) has multiple code block formatting and consistency issues in the Logical operators and Nullish Coalescing sections.
Location
File: pages/fundamentals.md
Section: Logical operators, Nullish Coalescing, and Conditional Branching
Lines affected: 417, 422-430, 456-461, 484, 497-498
Issues Found
1. Missing space after code fence (Lines 422-424, 428-430)
The code fences are missing a space between 'js' and '{monaco-run}':
- Line 422: js{monaco-run} should be js {monaco-run}
- Line 428: js{monaco-run} should be js {monaco-run}
2. Unnecessary comments before alert() (Line 417)
Line 417 has double slashes before alert():
- // alert(true || false); // alert('Boy' || 4)
Should be:
- alert(true || false); alert('Boy' || 4)
3. Unnecessary comments before console.log() (Lines 456-461)
Lines 457 and 460 have unnecessary // before console.log():
- // console.log(user.address.street);
- // console.log(user?.address?.street);
Should not have the // prefix for these examples to demonstrate actual usage.
4. Inconsistent console.log usage (Line 484)
Line 484 uses console.log without comment while other similar examples have it commented:
- console.log('Today is Monday')
Should be:
- // console.log('Today is Monday')
For consistency with the pattern used in other code examples.
5. Unnecessary comments before alert() (Lines 497-498)
Lines 497-498 have // before alert():
- // alert('Your size is 20')
- // alert('Thank you')
Should be:
- alert('Your size is 20')
- alert('Thank you')
Steps to Fix
- Open pages/fundamentals.md
- Add space after js in code fences on lines 422 and 428
- Remove unnecessary // comments before alert() on lines 417, 497-498
- Remove unnecessary // comments before console.log() on lines 456-461
- Add // before console.log() on line 484 for consistency
- Test that the documentation renders correctly
Additional Context
These issues affect the readability and consistency of code examples on page 14.
Related to Issue #46
Issue Description
Page 14 of the JavaScript Note (fundamentals.md) has multiple code block formatting and consistency issues in the Logical operators and Nullish Coalescing sections.
Location
File: pages/fundamentals.md
Section: Logical operators, Nullish Coalescing, and Conditional Branching
Lines affected: 417, 422-430, 456-461, 484, 497-498
Issues Found
1. Missing space after code fence (Lines 422-424, 428-430)
The code fences are missing a space between 'js' and '{monaco-run}':
2. Unnecessary comments before alert() (Line 417)
Line 417 has double slashes before alert():
Should be:
3. Unnecessary comments before console.log() (Lines 456-461)
Lines 457 and 460 have unnecessary // before console.log():
Should not have the // prefix for these examples to demonstrate actual usage.
4. Inconsistent console.log usage (Line 484)
Line 484 uses console.log without comment while other similar examples have it commented:
Should be:
For consistency with the pattern used in other code examples.
5. Unnecessary comments before alert() (Lines 497-498)
Lines 497-498 have // before alert():
Should be:
Steps to Fix
Additional Context
These issues affect the readability and consistency of code examples on page 14.
Related to Issue #46