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 trialAgnes Caringal
6,239 PointsITs all about Sass!...im stuck in this challege
confused! creatinga function double
<!DOCTYPE html>
<html>
<head>
<title>Sass Basics - Code Challenge</title>
<link rel="stylesheet" type="text/css" href="page-style.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div>
<p>
Bacon ipsum dolor sit amet biltong capicola meatball, corned beef venison tongue meatloaf ham sausage jerky short loin bacon. Shoulder pork pig, pancetta turducken flank strip steak prosciutto jerky venison.
</p>
<p>
Ground round bacon pig ribeye biltong capicola jerky prosciutto sirloin. Hamburger turducken corned beef leberkas andouille, shoulder pork shank strip steak biltong flank meatball pancetta chicken.
</p>
</div>
</body>
</html>
/* Write your SCSS code below. */
$input
@function double
2 Answers
Sean T. Unwin
28,690 PointsI would probably recommend rewatching the previous video starting at ~6:10 where Hampton Catlin writes a function.
For this challenge, the function needs to accept 1 argument with the name, $input
, and within the function you would @return
the $index
times 2.
Good luck. :)
Ted Sumner
Courses Plus Student 17,967 PointsAgnes,
This is essentially the same question we worked through when you were working on JavaScript. I believe you need to take the time to study functions. There are some differences between languages, but the same principles apply from what I can tell.
Are you following along in workspaces or another text editor? If not, you should. I see a huge difference in my understanding when I follow along. If you are not sure you understand, try tweaking the code to do something else.
Speed through courses is not going to accomplish anything unless you also understand what you are learning. I am having to repeat courses because I went too fast through some. I recommend that you follow Sean's advise regarding looking at the course again.
Agnes Caringal
6,239 Pointsyes Ted Sumner :) actually I cant finished this challenge that's why I skip this track and I went to JavaScript, my plan is to finish the track then after that I will start to build my 1st website. What do you think the best way to learn?
Ted Sumner
Courses Plus Student 17,967 PointsWatch the video and follow along. If you have any question about understanding, rewatch the video and follow along again. Pause at each step and make sure you understand what is happening. Write your own code that is similar and see if it works. I watch the video as many as 4 or 5 times on some concepts. If I still don't understand, I post on the forum. When I post on the forum for those types of questions, I try to post what I understand is supposed to happen. Sometimes I have a fundamental misunderstanding. Sometimes I have looked at the code too long and am missing punctuation or other simple thing.
A good example of messing around happened to me today. A site I am building was not working. I added code to each important step to display a signal as to where the code was. I discovered that it operated properly by itself, but then broke when incorporated with other code. Since some worked in the other code, I figured out it had to be interacting in an improper way. I started playing with the code until the problem changed. I then knew the core problem and was able to work around it. My most recent post is about that problem and the proper way to avoid it with code.
The key think you should take away is to play with the code. Break it, change values, change the way it works. That is the way I think you best learn what is really happening and will enable you to troubleshoot your own code.
You seem to have trouble with the way functions work in general. Go to one that you have some understanding for (maybe JavaScript) and play with it until you understand what is happening. JavaScript functions are similar in logic to Sass. The syntax is a little different, but not that much.