Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

andrew wolff
andrew wolff
5,980 Points

Ghostery chrome extension hides random numbers?

Why can't see the random numbers unless I pause the ghostery extension?

1 Answer

Steven Parker
Steven Parker
229,644 Points

I'm not sure what "random numbers" you are referring to.

But if I understand correctly, "Ghostery" blocks website actions that it is configured to prevent and/or actions that it considers a security risk.

If you are creating scripted programs that run in your browser, it's quite likely that scripted functionality could be misinterpreted (or maybe correctly interpreted!) as something it should block.

andrew wolff
andrew wolff
5,980 Points

Oh, sorry. Thought it attached the question to the lesson. It's in JavaScript Loops, Arrays and Objects "What are Loops" section. With the code I was writing along with the video, it only worked after pausing ghostery. This is the code.

function randomNumber(upper) {
  return Math.floor( Math.random() * upper ) + 1;
}
var counter = 0;
while (counter < 10) {
  var randNum = randomNumber (6);
  document.write(randNum + " ");
  counter += 1;
}