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
  • Janina Alvarez
    Janina Alvarez
    8,083 Points

    Why does an arrow function not allow "this" access, but function() {} does?

    Posted June 13, 2024 4:48am by Janina Alvarez
    Janina Alvarez
    8,083 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Fendy Azman
    Fendy Azman
    8,514 Points

    Problem with returning number of char in string

    Posted July 31, 2023 2:40am by Fendy Azman
    Fendy Azman
    8,514 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Samuel Kleos
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points

    I declared the method differently. Is this proper?

    Posted February 26, 2023 10:30am by Samuel Kleos
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Jessie Doherty
    Jessie Doherty
    7,571 Points

    object literal question

    Posted May 7, 2022 1:19am by Jessie Doherty
    Jessie Doherty
    7,571 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • ja5on
    ja5on
    10,339 Points

    Having to cheat online copy paste question into google Plus no workspaces available on this entire part of the course

    Posted May 27, 2021 10:43am by ja5on
    ja5on
    10,339 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    2 Answers

  • Kylie Soderblom
    Kylie Soderblom
    3,890 Points

    Your countWords() method is not returning the correct number of words.

    Posted May 19, 2021 1:51am by Kylie Soderblom
    Kylie Soderblom
    3,890 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Adrian Kucman
    Adrian Kucman
    10,654 Points

    Adding a method to an object literal - error unexpected identifier

    Posted April 17, 2021 9:39am by Adrian Kucman
    Adrian Kucman
    10,654 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Taylor Hall
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Taylor Hall
    Front End Web Development Techdegree Graduate 14,496 Points

    I don't think the previous videos have been good enough to prepare us for this challenge.

    Posted November 29, 2020 9:58am by Taylor Hall
    .a{fill-rule:evenodd;}techdegree seal-36
    Taylor Hall
    Front End Web Development Techdegree Graduate 14,496 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    0 Answers

  • Umar Ijaz
    PLUS
    Umar Ijaz
    Courses Plus Student 7,278 Points

    What counts as a word?

    Posted October 18, 2020 10:15pm by Umar Ijaz
    Umar Ijaz
    Courses Plus Student 7,278 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Trevon Allen
    Trevon Allen
    7,903 Points

    Your countWords() method is not returning the correct number of words.

    Posted September 6, 2020 5:08am by Trevon Allen
    Trevon Allen
    7,903 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Richard Preske
    PLUS
    Richard Preske
    Courses Plus Student 4,356 Points

    countWords issue

    Posted May 5, 2020 4:51pm by Richard Preske
    Richard Preske
    Courses Plus Student 4,356 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Alex Shah
    Alex Shah
    5,420 Points

    Add a method to the object literal called countWords(). countWords() should return the number of individual words in the

    Posted April 16, 2020 2:52pm by Alex Shah
    Alex Shah
    5,420 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    3 Answers

  • Christian Delos Reyes
    Christian Delos Reyes
    9,199 Points

    I have the same code, but mine doesn't work.

    Posted September 18, 2019 4:26pm by Christian Delos Reyes
    Christian Delos Reyes
    9,199 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Stan Dav
    Stan Dav
    3,213 Points

    Hello, why my code is returning error Bummer: Cannot read property 'split' of undefined

    Posted August 15, 2019 8:27am by Stan Dav
    Stan Dav
    3,213 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • James Viavattine
    James Viavattine
    4,926 Points

    What am I doing wrong here?

    Posted May 4, 2019 1:15am by James Viavattine
    James Viavattine
    4,926 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • toguchir
    toguchir
    6,541 Points

    I have typed in the exact solution from the next step and I am receiving an "Unexpected Identifier" Error

    Posted April 28, 2019 2:49pm by toguchir
    toguchir
    6,541 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Alasdair Marchant
    Alasdair Marchant
    4,592 Points

    how do I count the number of words?

    Posted January 5, 2019 12:20pm by Alasdair Marchant
    Alasdair Marchant
    4,592 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Marcell Ciszek
    Marcell Ciszek
    7,255 Points

    please help me with this code

    Posted September 28, 2018 4:23am by Marcell Ciszek
    Marcell Ciszek
    7,255 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • Edmundo Ruiz
    Edmundo Ruiz
    3,488 Points

    totally lost

    Posted September 22, 2018 8:53pm by Edmundo Ruiz
    Edmundo Ruiz
    3,488 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    2 Answers

  • Bravo Bravo
    Bravo Bravo
    489 Points

    Dunno what to do

    Posted September 13, 2018 3:37am by Bravo Bravo
    Bravo Bravo
    489 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

  • MARIA Quadri
    MARIA Quadri
    2,572 Points

    I'm stuck on this code.

    Posted September 11, 2018 11:35pm by MARIA Quadri
    MARIA Quadri
    2,572 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    4 Answers

  • Alexander Davison
    Alexander Davison
    65,470 Points

    Practice objects problem [SOLVED]

    Posted September 5, 2018 2:16pm by Alexander Davison
    Alexander Davison
    65,470 Points
    • JavaScript
    • Practice Object Basics in JavaScript
    • Practicing Object Basics
    • Practice Adding a Method to an Object Literal

    1 Answer

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