Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Need Help with Testing functions (console.log)
Hi, so I have a project on code.org (Unit 7 Lesson 9,10)that you have to make a library out of. The requirement was that you needed 2 functions with at least 1 loop, parameter, conditional statement, return value. I have built the function, but have no idea how to test it out using console.log. Can someone show me how to?
(Wanted to make functions that is like cereal calories guessing game, shows a picture of cereal, user input random calorie guess, if correct says right, if wrong, then says wrong. After one guesses regardless of right or wrong, it moves on to the next cereal)
Here is my code, its uneditible, but u can view. https://studio.code.org/projects/applab/ekIz6IpEFAOAz5Nsp2akylxDzTAsuW2mi5FVUr4kosc
Here is what I want it to do, but with NO screen UI and all on console. log https://studio.code.org/projects/applab/NzL6MI1j-_I0JsAYwUWYsozK6bTAnyl_ojbWYCQjVAo Can someone show me how I can show the game on console log? Also Does anyone know where I can add a for loop and a algorithm with sequencing, selection and iteration?