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

JavaScript JavaScript Basics (Retired) Working With Numbers The Random Challenge

appreciate your help with the below

var max = prompt('Please Enter A Number');

var convertMax = parseInt(max);

var randomNumber = Math.floor(Math.random() * convertMax)+1;

console.log("The digit + randomNumber + is between 1 and + max");

Displays : The digit + randomNumber + is between 1 and + max

And not the actual value of the 'randomNumber or max value...

any suggestions please ?

2 Answers

Hello

console.log("The digit " + randomNumber + " is between 1 and + max");

if this answers your question please mark the question as answered.

Thanks

console.log("The digit " + randomNumber + " is between 1 and " + max);

i think that is what you meant ! thanks for the heads up ! sometimes it is just there but you just dont see it !

sure will do.

sure ... I apologize I did not notice/see the last +. Glad it is resolved.