# Basic JavaScript - Returning Boolean Values from Functions

**URL:** <https://forum.freecodecamp.org/t/basic-javascript-returning-boolean-values-from-functions/655730>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [December 13, 2023, 10:36pm UTC](https://forum.freecodecamp.org/t/basic-javascript-returning-boolean-values-from-functions/655730 "2023-12-13T22:36:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcdc23](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dcdc23](https://forum.freecodecamp.org/u/dcdc23)\
**Post date:** [December 13, 2023, 10:36pm UTC](https://forum.freecodecamp.org/t/basic-javascript-returning-boolean-values-from-functions/655730/1 "2023-12-13T22:36:54Z")

</div>

### Tell us what’s happening:

I’m getting these two error messages and I’m not sure what I’m doing wrong here.

- `isLess(15, 10)` should return `false`

- Failed:You should not use any `if` or `else` statements

### Your code so far

```auto
function isLess(a, b) {
  // Only change code below this line
  if (a < b) {
      return a < b;
  } 
  // Only change code above this line
}

isLess(10, 15);

```

```javascript
function isLess(a, b) {
  // Only change code below this line
  if (a < b) {
      return a < b;
  } 
  // Only change code above this line
}

isLess(10, 15);

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36`

### Challenge Information:

Basic JavaScript - Returning Boolean Values from Functions

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![dcdc23](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dcdc23](https://forum.freecodecamp.org/u/dcdc23)\
**Post date:** [December 13, 2023, 10:41pm UTC](https://forum.freecodecamp.org/t/basic-javascript-returning-boolean-values-from-functions/655730/2 "2023-12-13T22:41:03Z")

</div>

Never mind I was able to figure this out on my own

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 13, 2024, 10:41am UTC](https://forum.freecodecamp.org/t/basic-javascript-returning-boolean-values-from-functions/655730/3 "2024-06-13T10:41:55Z")

</div>

Closed on June 13, 2024, 10:41am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
