Skip to content

CodeLouisville/php-exercise-odd-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odd Numbers

For this PHP code exercise, create a file named odd_numbers.php. This file should contain a function named odd_numbers() which accepts one parameter. The parameter must be an array.

Given an array, odd_numbers() will return an array containing only the odd numbers from the given array in ascending order. If there are no odd numbers in the given array, odd_numbers() should return an empty array.

For example, given [3, 2, 1], odd_numbers() should return [1, 3].

Note: for this exercise, a number means a whole number or, in PHP terms, an integer value.

Just getting started?

Review the PHP Code Exercises documentation for more details on performing code exercises.

Need help?

Jump on the PHP channel in Slack and ask your fellow students and mentors for a hint.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages