User Story: Implement Arrow Functions for Basic Number Operations
Title
As a developer, I want to implement and use arrow functions for basic number operations so that I can understand their syntax and usage in JavaScript.
Acceptance Criteria
- An arrow function should be implemented that takes a number as input and prints it to the console
- An arrow function should be implemented that takes a number as input and returns true if even, false if odd
- Both functions should work correctly with positive and negative integers
- The functions should be demonstrable with any array of numbers
- The implementation should include comments explaining how the arrow functions work
- The code should follow modern JavaScript best practices
- The functions should handle invalid inputs gracefully (e.g., non-numbers)
Example Input and Output
Example 1: Print Numbers Function
Input:
const numbers = [1, 5, 10, -3, 22];
Output:
Example 2: Even/Odd Check Function
Input:
const numbers = [1, 2, 3, 4, 5, 6];
console.log(results);
Output:
User Story: Implement Arrow Functions for Basic Number Operations
Title
As a developer, I want to implement and use arrow functions for basic number operations so that I can understand their syntax and usage in JavaScript.
Acceptance Criteria
Example Input and Output
Example 1: Print Numbers Function
Input:
Output:
Example 2: Even/Odd Check Function
Input:
Output: