Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos and minor fixes to Language list concept exercise #603

Merged
merged 5 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions concepts/arrays/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $no_keys == $integer_keys // => equal returns true
$no_keys === $integer_keys // => strictly equal returns true
```

A values are of `mixed` type, and each value in an array is not required to be of the same type.
All values are of `mixed` type, and each value in an array is not required to be of the same type.

## Using Arrays

Expand All @@ -29,4 +29,3 @@ $prime_numbers[5] = 13; // replace 12 with 13

$prime_numbers[] = 17; // array now contains [1, 3, 5, 7, 11, 13, 17]
```

22 changes: 11 additions & 11 deletions exercises/concept/language-list/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## General

- Review the [Array Language Reference][ref-arrays]
- review the [Array Function Reference][ref-array-functions]
- Review the [Array Function Reference][ref-array-functions]

## 1. Define a function to return an empty language list

Expand All @@ -12,27 +12,27 @@

## 2. Modify function to create a list from any number of languages

- refer to the function reference for [variable-length-arguments][variable-arguments]
- Refer to the function reference for [variable-length-arguments][variable-arguments]

## 3. Define a function to add a language to the list

- create a new function to perform the operation
- re-use an [existing function][ref-array-functions] or use the [insert syntax][squre-bracket-syntax]
- Create a new function to perform the operation
- Re-use an [existing function][ref-array-functions] or use the [insert syntax][square-bracket-syntax]

## 4. Define a function to remove an item from the language list

- create a new function to perform the operation
- re-use an [existing function][ref-array-functions] to perform the operation
- Create a new function to perform the operation
- Re-use an [existing function][ref-array-functions] to perform the operation

## 5. Define a function to get the first item in the list
## 5. Define a function to get the first item in the list

- create a new function to perform the operation
- use the [index syntax][index-syntax] to get the first element
- Create a new function to perform the operation
- Use the [index syntax][index-syntax] to get the first element

## 6. Define a function to return how many languages are in the list

- create a new function to perform the operation
- re-use an [existing function][ref-array-functions] to perform the operation
- Create a new function to perform the operation
- Re-use an [existing function][ref-array-functions] to perform the operation

[ref-arrays]: https://www.php.net/manual/en/language.types.array.php
[ref-array-functions]: https://www.php.net/manual/en/ref.array.php
Expand Down
6 changes: 3 additions & 3 deletions exercises/concept/language-list/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ language_list();

## 2. Modify function to create a list from any number of languages

Modify the `language_list` function, so it takes a variadic argument or string languages.
Modify the `language_list` function, so it takes a variadic argument of languages (strings).
It should return the resulting list with the languages in the list.

```php
Expand Down Expand Up @@ -78,8 +78,8 @@ It should return the number of languages in the list.
```php
<?php

$language_list = $language_list("PHP", "Prolog", "Wren");
$language_list = language_list("PHP", "Prolog", "Wren");
// => ["PHP", "Prolog", "Wren"]
language_list_length($language_list);
// => 2
// => 3
```
2 changes: 1 addition & 1 deletion exercises/concept/language-list/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $no_keys == $integer_keys // => equal returns true
$no_keys === $integer_keys // => strictly equal returns true
```

A values are of `mixed` type, and each value in an array is not required to be of the same type.
All values are of `mixed` type, and each value in an array is not required to be of the same type.

### Using Arrays

Expand Down