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

Mahmoud Talass
Mahmoud Talass
9,274 Points

Nothing is showing up in the console and I don't know if I am doing anything wrong

function rectangle(width, height) { const total = width * height; return total; }

function prism(width, height, length) { const total = width * height * length; return total; }

function circle(radius) { const total = Math.PI * Math.pow(radius, 2); return total; }

function sphere(radius) { const total = 4/3 * Math.PI * Math.pow(radius, 3); return total; }

console.log( rectangle(5, 22) ); console.log( prism(4.5, 12.5, 17.4) ); console.log( circle(7.2) ); console.log( sphere(7.2) );

This is my solution for the problem and idk why it's not working. I don't see any issue with my code so I am confused

1 Answer

Hi Mahmoud,

your code works for me and all the logs display fine.

If nothing is shown in your console then I assume it hast to do with the linking of your javascript file.

Did you check if you javascript file is linked correct?

Blessings from Berlin, Nils

Mahmoud Talass
Mahmoud Talass
9,274 Points

That's Interesting, thank you for checking out the code!