fix(curriculum): specify array is returned from the function (#43425)
* (fix)Sort an array alphabetically using the sort Method - Array is returned from the function #43417 * (mod)Curriculum - Adding explicit instructions so that function will return a sorted array #43417 * (fix)Curriculum - Correcting grammetic error in instructions #43417 * mod: updated transaltion message #43417 * fix: Curriculum - Updated grammatical error in instructions #43417 Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
This commit is contained in:
@ -38,7 +38,7 @@ JavaScript's default sorting method is by string Unicode point value, which may
|
||||
|
||||
# --instructions--
|
||||
|
||||
Use the `sort` method in the `alphabeticalOrder` function to sort the elements of `arr` in alphabetical order.
|
||||
Use the `sort` method in the `alphabeticalOrder` function to sort the elements of `arr` in alphabetical order. The function should return the sorted array.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -83,7 +83,7 @@ assert(
|
||||
function alphabeticalOrder(arr) {
|
||||
// Only change code below this line
|
||||
|
||||
|
||||
return arr
|
||||
// Only change code above this line
|
||||
}
|
||||
alphabeticalOrder(["a", "d", "c", "a", "z", "g"]);
|
||||
|
Reference in New Issue
Block a user