Implement the function gte in helper.js. It should accept 2 parameters (x, y) and

  • return true if x is greater than or equal to y
  • return false otherwise

The function gte should not contain more than one if statement

This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task

helper.js

export const gte = (x, y) => {
  return true;
}

solution.js

/**
 * Implement the function `gte` in helper.js. It should accept 2 parameters (x, y) and:
 * - return `true` if x is greater than or equal to y
 * - return `false` otherwise
 *
 * The function `gte` should contain a single `if` statement
 * */

import { gte } from './helper.js';

console.log(gte(5, 10));   // false
console.log(gte(5, 3));    // true
console.log(gte(5, 5));    // true