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 trialBenoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 Pointssame usual problem 'parse', reason why I add a new variable for a syntax, I copy the programming, function in function
var count = 0; var counter=0; while ( counter < 27) {var RandNum = randomNumber(6); document.write(RandNum +count " "); counter+=1;}
script.js var count = 0; var counter=0; while ( counter < 27) {var RandNum = randomNumber(6); document.write(RandNum +count " "); counter+=1;}
4 Answers
Kevin Korte
28,149 PointsOne thing I immediately noticed is that your document.write appears to be missing a +
.
You have document.write(RandNum +count " "
and I think what you wanted was document.write(RandNum + count + " "
Also, where is the randomNumber
function coming from? Is that defined in another part of the script.js file that your question referenced?
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 Pointsproblem still alive
Steven Parker
231,572 PointsShow the code as it is now after the changes (including the definition of "randomNumber"). Be sure to use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. Or watch this video on code formatting.
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 PointsA Thousand thanks, so much appreciate, cheers, Benoit
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 PointsYou are a very nice person Steven, thank you.
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 PointsBenoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 Pointsfirst of all, thank you very much, Kevin! I did realize that I miss a lot of challenge (I believe just me); because my library is incorrect and I can't work on the front page, this is the reason why, because I spend a long time searching, I tried with RandomNumber Anyway thousand thanks Kevin.
this is the result: Bummer! There was an error with your code: SyntaxError: Parse error Restart