Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Sass Basics (retired) Speeding up Workflow with Sass Sass Functions

Todd Squitieri
Todd Squitieri
8,001 Points

Function Should Return Input * 2

I'm getting an error message in this particular challenge that states the following:

Bummer! The function should return the value '$input * 2'.

Here's what I tried:

@function double($input) {
  @return ($input * 2)

  }

and

@function double($input) {
  @return unquote($input * 2)

  }
@function double($input) {
  @return ($input * 2);

  }

Any help is much appreciated.

-T

3 Answers

Hey man, because its basically doing math and returning it. You don't have to use parenthesis or semi colon to terminate the line. Just type it out and it will pass. It should look like this:

@function double($input){
     @return $input * 2
}

Hope that helps. Take care

Todd Squitieri
Todd Squitieri
8,001 Points

Hi Shawn!

Problem solved! Thank you so much for your help! I appreciate it!

Sincerely,

Todd

Anytime.

Shawn,.. thanks,...