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 Instance Methods

Guil's code for publishedAt and shortDescription are not working

I've attempted the Nov 11, 2020 solutions and they do not appear to be working either.

3 Answers

Robert Manolis
STAFF
Robert Manolis
Treehouse Guest Teacher

Hey Liz Novaski, go ahead and share a snapshot of your code or a GitHub repo so we can check it out. :thumbsup:

It appears to be working as of this morning, so I'm not sure what changed? I was receiving the same error as Jordan describes in their comment where it was just showing the publishedAt() { const date = moment(this.createdAt).format("MMMM D, YYYY, h:mma"); return date; } instead of the formatted date

Liz Novaski Jordan Kittle Robert Manolis ,

This also worked for me. First time I think I'd seen calling a function inside a view file.

Thanks, Jordan Kittle !

Yes. Thanks Jordan Kittle. That was my issue too.

James Crosslin
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
James Crosslin
Full Stack JavaScript Techdegree Graduate 16,882 Points

As an additional note, I've had to restart my server manually after changing the initializer in my model. This may be why it worked when you shut down and came back and started your server manually.