Skip to content

Commit

Permalink
chore(levels): improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed May 31, 2024
1 parent 98fee66 commit be10dac
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/levels/1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ${addText('Uncomment the exit')}
`

export const script = `
// Single-line comments start with 2 forward slashes
// A single-line comment starts with 2 forward slashes
// console.log('This is commented out')
console.log('This is not commented out')
Expand Down
2 changes: 1 addition & 1 deletion src/levels/10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ${addText('Update password & go to key')}

export const script = `
/**
* Variables store data
* A variable stores data
* 'const' cannot be reassigned, whereas 'let' can be reassigned
*/
Expand Down
2 changes: 1 addition & 1 deletion src/levels/11.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ${addText('Repeat the password')}

export const script = `
/**
* For loops repeat a block of code
* A for loop repeats a block of code
*/
const key = get('key')[0]
Expand Down
2 changes: 1 addition & 1 deletion src/levels/15.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ${addText('Exit in a loop')}

export const script = `
/**
* setInterval() calls a function at specified intervals
* setInterval() calls a function at specified periods
*/
const MILLISECOND = 1
Expand Down
2 changes: 1 addition & 1 deletion src/levels/16.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ onAdd('exit', () => {

export const script = `
/**
* Can we speed this up?
* Can we speed things up?
*/
const player = get('player')[0]
Expand Down
2 changes: 1 addition & 1 deletion src/levels/4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ${registerWinCondition(level)}

export const script = `
/**
* Strings are text inside single or double quotes
* A string is text inside single or double quotes
*/
const exit = 'exite'
Expand Down
2 changes: 1 addition & 1 deletion src/levels/5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ${addText('Exit is not in view?')}

export const script = `
/**
* Numbers represent floating-point numbers like 42 or -13.37
* A number represents floating-point digits like 42 or -13.37
*/
add([
Expand Down
2 changes: 1 addition & 1 deletion src/levels/6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ${addText('Exit is not truthy')}

export const script = `
/**
* Booleans can either be true or false
* A boolean can either be true or false
*/
if (false) {
Expand Down
4 changes: 3 additions & 1 deletion src/levels/7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ onUpdate(() => {

export const script = `
/**
* Arrays are an ordered list of data
* An array is an ordered list of data
*/
const map = [
Expand All @@ -45,6 +45,8 @@ const map = [
'#######',
]
map[6] = map[0]
add(['map', { map }])
`

Expand Down
2 changes: 1 addition & 1 deletion src/levels/8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ${addText('Reposition me')}

export const script = `
/**
* Objects are a collection of properties or key-value pairs
* An object is a collection of properties (key-value pairs)
*/
const coordinates = {
Expand Down
2 changes: 1 addition & 1 deletion src/levels/9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ${addText('Move me')}

export const script = `
/**
* Functions are blocks of code designed to perform a task
* A function is a block of code designed to perform a task
*/
const player = get('player')[0]
Expand Down

0 comments on commit be10dac

Please sign in to comment.