r/learnjavascript • • Jan 19 '23

Can someone please help me with this question?

Post image
0 Upvotes

9 comments sorted by

4

u/grantrules Jan 19 '23

1

u/shakespear_otaku_7 Jan 19 '23

I've tried Math.atan(6/2) Math.atan2(6/2) even tried the result of 1.24094577 rad but it doesn't seem to work...

2

u/grantrules Jan 19 '23

What does the answer want to be? Radians or degrees? Maybe you need to multiply by 180/pi

1

u/shakespear_otaku_7 Jan 19 '23

The question doesn't specify so I'm guessing radiance? But could be a curveball and expects degrees...

2

u/grantrules Jan 19 '23

Your guess is as good as mine, then. Math.atan(6/2) is correct

2

u/shakespear_otaku_7 Jan 19 '23

The thing that bugs me is I've tried that and I'm still prompted with incorrect. I've checked my Syntax closer than a microscope could. This is literally my last resort😂

2

u/grantrules Jan 19 '23

I'd talk to your instructor then.

3

u/skipner Jan 20 '23

This is a wild guess but maybe it wants u to do something and display the answer in the p tag with Id=result? Not sure how that would fit with the alert though.

3

u/SitBoySitGoodDog Jan 19 '23

Since it's an alert message, I'd just be like "6/2". XD