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 Numbers and Strings

Valerie Smith
PLUS
Valerie Smith
Courses Plus Student 5,244 Points

for parceInt challenge, it is not reading my conversion!!! parceInt should not be a variable but a function... right?

mulitiply the width with the number of divs. but convert string width into integer.

My answer: var width = '190px'; var numOfDivs = 10; var totalWidth = parceInt(width) + numOfDivs;

they are saying "cannot find parceInt variable".... what am I missing?!?!

app.js
var width = '190px';
var numOfDivs = 10;
var totalWidth = parceInt(width) * numOfDivs;
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="app.js"></script>
</body>
</html>

1 Answer

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

There's a typo in your line, it's parseInt() not parceInt().

Valerie Smith
Valerie Smith
Courses Plus Student 5,244 Points

Thanks William. I had to change the spelling and it worked. The question used the incorrect spelling as well. Best.

William Li
William Li
Courses Plus Student 26,868 Points

huh? I don't believe parseInt() function was mentioned anywhere in the code challenge description.