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 trialnfs
35,526 PointsNot getting what things a function needs to work.
So can anyone tell me the things I need to learn to make a function work? and frankly speaking, I simply don't understand functions.
4 Answers
Steven Parker
231,269 PointsA function is basically a "subprogram".
It can be called on to run by another part of the program (including from a function). Like the program itself, it contains a sequence of statements to be performed.
Optionally, a function can be given (we usually say "passed") one or more values to work with. And when it finishes, it can return a value back to the part of the program that called it.
nfs
35,526 Pointsis there any book that'll help me get a good grip on javascript?
Steven Parker
231,269 PointsPlenty, but they differ so much in style it might be good for you to look at some sample pages and see which might appeal to you the most. You might try browsing Amazon, they often offer sample pages to read for their books.
I wouldn't neglect your local library. They may not have the very most current editions with the latest features, but most of the fundamentals of JavaScript are the same as they always have been.
Also, concepts like "function" are common to most programming languages. You might also look for topics like "basic computer programming" that aren't language-specific.
nfs
35,526 PointsThank you.
Tina Maddox
28,102 PointsHello Nafis,
I too was in the same place you are when I began learning JavaScript. I have just completed the Full Stack JavaScript track here on Treehouse and highly recommend it.
I have several books on the subject but find JavaScript the Good Parts to be most helpful. It was recommended by senior developers within my community and is free to download. It should be most helpful as you continue your studies.
Please let me know if you have any questions.
Tina :)
Steven Parker
231,269 PointsThat's an old but still good book, and free to download. But just be aware that Douglas Crockford has revised his opinions slightly since then, as he has stated in more recent publications and conference presentations. Some of his conference presentations are available on YouTube.
nfs
35,526 PointsI'll surely read that book.