Skip to content

Instantly share code, notes, and snippets.

@4RSIM3R
Created September 26, 2023 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4RSIM3R/41448d56fcfac83600d24be621fb88c0 to your computer and use it in GitHub Desktop.
Save 4RSIM3R/41448d56fcfac83600d24be621fb88c0 to your computer and use it in GitHub Desktop.
[PHP] Count Odd
<?php
// Complete this function, that count how much odd number in an array
// example :
// payload : [1, 2, 3, 4, 5, 6, 7]
// the result is 4
function countOdd($numbers) {
}
$result1 = countOdd([1, 2, 3, 4, 5, 6, 7]);
echo $result1; // 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment