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
Dewi Tjin
2,275 PointsTesting code:
How do I test the treehouse codes on console like the videos?? For example, in the js tutorial I can write the code in the html file but when I open console on chrome I'll get undefinded methods if I call anything.. so it's not actually running the code and I want to see what I'm doing..
2 Answers
Dewi Tjin
2,275 PointsThank-you! I found jsfiddle too which is really cool if anyone is interested...
Sreng Hong
15,083 PointsHi Dewi!!! To test the javascript code, you can just create a simple html file and include the <script></script> in the body. Then, write what you want to test in the script tag. Finally open the html file on your browser and simply open your console. Hope this help.
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
</head>
<body>
<script>
console.log("hello");
</script>
</body>
</html>
Jeff Busch
19,287 PointsJeff Busch
19,287 PointsCan we see your code? Undefined methods usually means undefined methods. Seems like you are testing your code.