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 Object-Oriented JavaScript Working with Classes in JavaScript Adding methods to classes

Still no pass! Anybody know why?

How to convert gpa to string and return it.

class Student {
        this.gpa = gpa;
    const stringgpa = String.valueOf(gpa);
    return stringgpa;

const student = new Student(3.9);

2 Answers

Tim Knight
Tim Knight
28,888 Points

Hi Fabian,

You might want to check out the thread from your previous comment at https://teamtreehouse.com/community/how-do-i-convert-the-gpa-value-to-string-anybody. I just tried the suggestions from that thread and it passed without any issues.

Hi, Tim You were right the this.gpa.toString(); was indeed right and sometimes workspaces experiences some hickups i have noted. Wether this is do to memory issues? But your answer is the best. Thanks