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 trialGemz Nunn
16,296 PointsSass Functions Code Challenge - where am I going wrong?
I'm having a little trouble with the final code challenge on Sass Functions.
I've written the code according to my understanding of the lesson and the documentation. When I check the code, it says ' Bummer! The function should return the value '$input * 2'.'
Where am I going wrong? I honestly don't understand where I've made a mistake.
/* Write your SCSS code below. */
@function double($input) {
@return ($input * 2);
}
Edit: I've tried this function out in my own Sass file and it compiles correctly. Is it an error with the challenge?
1 Answer
Chase Marchione
155,055 PointsLooks like you have a logical answer, but the Treehouse compiler isn't anticipating parentheses within the function.
@return $input * 2;
Gemz Nunn
16,296 PointsGemz Nunn
16,296 PointsThanks CJ! That worked a treat! I can get on and complete the rest of the challenge now.