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 trialHilary Katsande
9,045 Pointsplease help
create a new variable named total width that multiplies the width by the numOfDivs
var width = '190px';
var numOfDivs = 10;
var totalWidth = parselnt (width)*numOfDivs;
<!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>
2 Answers
Steven Parker
231,269 PointsYou just have a spelling/typo error, "parselnt" (with lower-case "L") instead of "parseInt" (with capital "I").
Also, while space is allowed by the language, it is considered a "best practice" when calling a method to follow a method name immediately by the open parenthesis.
Dennis Eitner
Full Stack JavaScript Techdegree Graduate 25,644 Points/* Moderator redacted */
Steven Parker
231,269 PointsFYI: Explicit answers without any explanation are strongly discouraged by Treehouse, and subject to redaction by moderators.
Jennifer Nordell
Treehouse TeacherHi Dennis Eitner ! While we all appreciate your help in the Community, leaving explicit answers that can be copy/pasted directly into a challenge to pass it while not including any explanation is frowned upon. Could you please update your answer to include an explanation? Thanks