S Assignment 2: Math, Properties, Methods, and Global Objects
kennardoe (0)

Hi! Can someone help me understand what I am doing wrong? I am having a hard time on the exercise 3 and 4.

You are viewing a single comment. View All
Vandesm14 (691)

Can you put your code into a repl? That way I can show you what changes you need to make.

Vandesm14 (691)

Exercise Three

You have to create a variable called length and assign to it the length of name. To find the length of a variable in Javascript, you have to add the .length property to the variable name: myVar.length

Exercise Four

You have to create a variable called 'rounded' and assign to it the rounded form of num1. To round numbers in Javascript, you have to put the number though the Math.round() function like so: Math.round(number).

I hope this clears up any problems/issues you have with the assignments.

Please mark this as answered if I helped your problem 👍

mwilki7 (287)

every time a picture of code is posted a kitten dies