FAQ: Introduction to JavaScript - Built-in Objects

Thank you midlindner. I figured it out after I had already posted the question. You are correct. This was one of those sensory overload moments. However, even though I figured out the SyntaxError, your response also pointed out something that I did not realize.
That is the the upward arrow. For some reason I was thinking that it was a part of the code. Your response is greatly appreciated.

Again thank you very much.


1 Like

Is there a reset method, so I can reset the questions in the lessons ‘Built-in Objects’? Thank you. I ask this because Question 1. told me I was correct, but it wasn’t the actual correct answer. I am trying to work these problems out correctly, however the program seems to only allowing a correct answer one time, and will not reset back to no answer.

There is a reset button next to the run button in the bar below code editor section.

You can also use keyboard shortcut alt + g to reset the exercise.

Great. Got it. Thank you.

I hope there are no more like this example:

Section 9:   
 question 1.  Inside of a console.log(), create a random number with Math.random(), then multiply it by 100.
    answer 1.  console.log(Math.floor(Math.random()) * 100);   is wrong but showed as correct
    answer 2.  console.log(Math.random() * 100);                       is correct and showed as correct
Both show as correct.  This was confusing for me.

Hi, I am not an expert in mathematics or programming but from what I read in this link (), this example is shown:
console.log (Math.floor (5));
// expected output: 5
And if the literal expression of this function is taken, it would not be necessary to multiply it by 51; the expression is the following: “returns the largest integer less than or ** equal ** to a given number.”, paying special attention to the word “equal”.

I recognize that this is mostly a community of other learners on the forums, but I have no idea where else to write this because every report I’ve ever made has been ignored. I’m hoping that someone sees this who can do something about the issue.

Please include wording that Math.random() generates a number between 0 (inclusive) and 1 (exclusive).

I was just reviewing this material after taking a break from JavaScript and I got very confused by the repeatedly non-explicit wording of the material. I thought I remembered Math.random() excluding 1, but the lesson material states it generates a number between 0 and 1. It then goes on to state that multiplying by 50 generates a number between 1 and 50. It does not explicitly state that 1 is excluded. I took a quiz on the material and ended up failing the question because this led me to believe I was misremembering information. Thankfully, when I finally chose the correct answer a prompt came up that helped clear the confusion.