Software used for the course

Which is the software used by Ivan to write on the whiteboard during the course?

1 Like

I have the same question.

1 Like

I think its this one: https://sketch.io/sketchpad/

2 Likes

You’re right, Mauro. Thanks!

1 Like

Hello. I am mid-way through the JavaScript class. I am doing Exercise 2 in Eloquent Javascript. I wrote the program for exercize one, quite simple; it runs nicely in the Eloquent Javascript test environment that comes with the book. BUT the console.log function doesn’t work when I write the program in a txt (html) file and then open it in a browser.
I have tested, and the variables get set and I can use alert() instead of console.log to ‘run’ the program and get results (albeit in a pop-up box). f I can run console.log in the console.
But console.log won’t run in any browser (Edge, Chrome nor Brave). When using alert() instead, each browser works… they are hung up over console.log.

I figured you must need a library, so I copied the script html google apix command that I saw in Ivan’s file - still no luck. Have spent hours online trying to figure out why console.log won’t work when called from the / JS area of html. A lot of folks online have the problem, but no answer has yet solved this.

Maybe you say something is wrong with the file, so of course I have copied ver batim what Ivan did online just to see. It is console.log – what might I be missing so I don’t spin my wheels for another set of hours ? I feel it is some ELEMENTAL environment setting that I am somehow missing.
ANY INPUT VALUABLE.
:slight_smile: Tara

Hi tara, can you please post your code here so we can look at it? :wink:

Ivo

turtls //tried below line to get console.log to work

This is the Title

This is the 2nd Title

<script>

  for (let num = 1; num <= 100; num ++) {
    outString = "";
    if (num%3 == 0) outString = "Fizz";
    if (num%5 == 0) outString += "Buzz";
    console.log(outString || num);

}
// console.log does not work on any browser
// works in Eloquent JS environment and in console

</script>
1 Like

Tara, your code works as itended. This is how I copied your code.

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>

    <script>

  for (let num = 1; num <= 100; num ++) {
    outString = "";
    if (num%3 == 0) outString = "Fizz";
    if (num%5 == 0) outString += "Buzz";
    console.log(outString || num);
}
// console.log does not work on any browser
// works in Eloquent JS environment and in console

</script>

  </body>
</html>

I think you are expecting for the console.log function to write the text directly to the HTML document. Console.log function only displays the information in the console.

To view it using Google Chrome do the following:

When you open up your HTML document you need to right click on the page and click on inspect element. After that you need to click on the console tab. In there you will be able to see that your code works just fine.

In order to make it appear on the actual website you need to add the following code below the console.log function.

    document.write(outString || num);
    document.write("<br>");

Hope that helps you out.

1 Like

I am going to try this… thanks so much for answering. I am sure that this is a newbie issue, but I yet don’t understand why it worked in Ivan’s screen for the ## pyramid yet won’t work in mine.

1 Like

No problem. Keep in mind that one wrong letter can mess the whole code up. But from what you sent the code seemed to work without any issues at all.

@Mauro it worked. THANK YOU. After hours of figuring it out, your answer worked. Thank you. I don’t yet understand why Ivan’s code with console.log worked, but mine didn’t… yet that might become apparent in time.

1 Like

No problem. I am glad I was able to help you out. Keep it up. :blue_heart:

1 Like