JavaScript JavaScript Numbers Working with Numbers Numbers and Strings

james presley
james presley
4,569 Points

please help not really understanding how to code this.

script.js
const width = '190px';
const totalImages = 10;
parseInt totalWidth = width * totalImages

1 Answer

Hi James!

This passes:

const width = '190px';
const totalImages = 10;

const totalWidth = totalImages * parseInt(width); // parseInt(width); returns 190

And so totalWidth ends up being 1900

I hope that helps.

Stay safe and happy coding!