Update refactor-global-variables-out-of-functions.english.md (#19751)
This commit is contained in:
committed by
Huyen Nguyen
parent
f55ab87094
commit
b1da17a309
@ -14,7 +14,7 @@ Adding one to a number is not very exciting, but we can apply these principles w
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
Refactor (rewrite) the code so the global array <code>bookList</code> is not changed inside either function. The <code>add</code> function should add the given <code>bookName</code> to the end of an array. The <code>remove</code> function should remove the given <code>bookName</code> from an array. Both functions should return an array, and any new parameters should be added before the <code>bookName</code> one.
|
||||
Rewrite the code so the global array <code>bookList</code> is not changed inside either function. The <code>add</code> function should add the given <code>bookName</code> to the end of an array. The <code>remove</code> function should remove the given <code>bookName</code> from an array. Both functions should return an array, and any new parameters should be added before the <code>bookName</code> one.
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
|
Reference in New Issue
Block a user