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 Introducing the Practice

stuck.. please dont send me complete code i just stuck line 9

3 Answers

I'm still not understanding. I don't know what code to put where and i'm just guessing.. const num1 = prompt("Please input a number"); num1 = parseFloat(num1);

I get uncaught type error Assignment to constant variable?

But if i change const to let it runs without errors is that because a const cannot be changed?

i get an error im not sure how to convert that value from a string to a floating point number. i watched video once i thought i understood but i dont..

Dont worry i'll go back through all the JasvaScript videos

Bolivar Arguello
seal-mask
.a{fill-rule:evenodd;}techdegree
Bolivar Arguello
Front End Web Development Techdegree Student 9,429 Points

Constants are block-scoped, much like variables defined using the let keyword. The value of a constant can't be changed through reassignment, and it can't be redeclared. source = https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const

that being said, unless you trying to run an unchangeable variable use 'let' instead of 'const'.