Help regarding exercise 7 - Area of rectangle

Hi I am a newbie to coding and stuck regarding this question. My answer I have put is below

var Width is = “100”
var Height is = “100”
var area = “Width * Height”

I have a feeling this is incorrect. Can anyone advise?

1 Like


Try this:

var width = 100;
var height = 100;
var surface = width * height;

Note that, by initializing a var with quotation marks " " you define it as a string. It will therefore hold whatever text you insert, but will not execute any calculations. Also, writing is before = will result in an error, but I suppose this was only a typo?

1 Like