Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Ranflin Diaz Baez
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Ranflin Diaz Baez
    Full Stack JavaScript Techdegree Student 1,357 Points

    Important: In each task of this code challenge, the code you write should be added to the code from the previous task.

    Posted March 26, 2022 1:13am by Ranflin Diaz Baez
    .a{fill-rule:evenodd;}techdegree
    Ranflin Diaz Baez
    Full Stack JavaScript Techdegree Student 1,357 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Xun Huang
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Xun Huang
    Web Development Techdegree Graduate 18,515 Points

    Can I also use unary"+" in this challenge?

    Posted January 21, 2022 10:44pm by Xun Huang
    .a{fill-rule:evenodd;}techdegree seal-36
    Xun Huang
    Web Development Techdegree Graduate 18,515 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Antoine Evanson
    Antoine Evanson
    5,677 Points

    Greetings community, I am unable to access JavaScript from my phone. Is their another way to complete the assignment?

    Posted November 30, 2021 1:58am by Antoine Evanson
    Antoine Evanson
    5,677 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Mamadou Sam
    Mamadou Sam
    5,717 Points

    how to change string into whole number

    Posted November 28, 2021 5:29pm by Mamadou Sam
    Mamadou Sam
    5,717 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Gavin Lefleur
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Gavin Lefleur
    Full Stack JavaScript Techdegree Student 742 Points

    Can anyone help? Imagine you have 10 images on a web page. Each image is 190 pixels wide. Using the two variables

    Posted August 15, 2021 6:43pm by Gavin Lefleur
    .a{fill-rule:evenodd;}techdegree
    Gavin Lefleur
    Full Stack JavaScript Techdegree Student 742 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    3 Answers

  • Alonzo Delk
    Alonzo Delk
    6,991 Points

    Do I multiply by the totalWidth? Or do I add another variable with the purseInt stating the amount?

    Posted April 1, 2021 12:01am by Alonzo Delk
    Alonzo Delk
    6,991 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • james presley
    james presley
    6,154 Points

    please help not really understanding how to code this.

    Posted March 17, 2021 9:29pm by james presley
    james presley
    6,154 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Hannah Sohn
    Hannah Sohn
    2,785 Points

    Why is my answer not working?

    Posted October 20, 2020 4:38pm by Hannah Sohn
    Hannah Sohn
    2,785 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    2 Answers

  • Kevin Leong
    Kevin Leong
    1,664 Points

    Javascript Numbers Challenge Task 1 of 1

    Posted September 25, 2020 4:51am by Kevin Leong
    Kevin Leong
    1,664 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Kevin Leong
    Kevin Leong
    1,664 Points

    JavaScript numbers challenge task 1

    Posted September 24, 2020 4:18am by Kevin Leong
    Kevin Leong
    1,664 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • terd47
    terd47
    4,436 Points

    I can' seem to figure out what the error is for this code. I get the error message "global leak detection: totalWidth".

    Posted September 14, 2020 5:23pm by terd47
    terd47
    4,436 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    2 Answers

  • theteamtreehouse
    theteamtreehouse
    3,472 Points

    Why this is wrong?

    Posted August 14, 2020 12:18pm by theteamtreehouse
    theteamtreehouse
    3,472 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Khatia Bagaturia
    Khatia Bagaturia
    2,050 Points

    Hi There ! Can you guys explain what am i writing wrong ? Thank you

    Posted July 12, 2020 5:37am by Khatia Bagaturia
    Khatia Bagaturia
    2,050 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    2 Answers

  • malcolm mowlam
    malcolm mowlam
    3,856 Points

    challenge task 1 of 1 javascript working with numbers

    Posted June 28, 2020 11:56am by malcolm mowlam
    malcolm mowlam
    3,856 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    2 Answers

  • Adeola Adeniyi
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Adeola Adeniyi
    Front End Web Development Techdegree Student 1,195 Points

    Help please

    Posted May 15, 2020 2:11am by Adeola Adeniyi
    .a{fill-rule:evenodd;}techdegree
    Adeola Adeniyi
    Front End Web Development Techdegree Student 1,195 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    1 Answer

  • Sean Marevanhema
    Sean Marevanhema
    11,605 Points

    Numbers and strings

    Posted April 3, 2020 4:46am by Sean Marevanhema
    Sean Marevanhema
    11,605 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    2 Answers

  • Sean Marevanhema
    Sean Marevanhema
    11,605 Points

    Numbers and strings

    Posted April 3, 2020 4:46am by Sean Marevanhema
    Sean Marevanhema
    11,605 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    0 Answers

  • Sahmad Nakumbe
    Sahmad Nakumbe
    3,423 Points

    Imagine you have 10 images on a web page. Each image is 190 pixels wide. Using the two variables in this script, create

    Posted April 2, 2020 3:11am by Sahmad Nakumbe
    Sahmad Nakumbe
    3,423 Points
    • JavaScript
    • JavaScript Numbers
    • Working with Numbers
    • Numbers and Strings

    3 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord