Jump to content
Killersites Community

webmanz

Member
  • Content Count

    58
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by webmanz

  1. This did not open in my browser even though saved as html file. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Javascript</title> </head> <body> </body> </html>
  2. webmanz

    What is wrong with this simple code?

    <h1> is working, you were right its a blank page with title, that's why I couldn't see anything. Thanks
  3. webmanz

    What is wrong with this simple code?

    I can right click on .html file from desktop, but problem is all I see is blank document, I don't see the title saying Javascript.
  4. Are all objects data types or only array objects?
  5. Difference between these two index? For ( index = 0; index < dogs.length; index + +); and indexOf
  6. Can someone tell me why my code didn't produce the same results as in Chapter 7 lesson 4. I only managed to get Loop Count: 10 to appear, I'm not able to get Loop Count: 0 to 9. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> Ch7 Javscript Loops</title> <script> function doItAgain(message){ for (var i=10; i>=0; i--) { var target = document.getElementById("target"); target.innerHTML = "LoopCount:" + i + "<br>" + target.innerHTML; cosole.log("LoopCount is now: " + i); } console.log ("End for loop"); var button = document.getElementById("looper"); button.value="Done looping!"; //button.style.fontSize="34px"; } </script> </head> <body> <h1>Looping can make your code spin!</h1> <input type="button" id="looper" value="Do it again!"> <p id="target"></p> <script> document.getElementById("looper").onclick=function(){ doItAgain(); this.style.color="red"; } </script> </body> </html>
  7. webmanz

    What does i stand for in i - - ?

    for ( var i = 10 ; i > = 10 ; i - - ) Why doesn't the i - - end in a semi-colon then parenthesis ? i.e. like this: i - - ; )
  8. What does the " i " stand for in i - - ? Special meaning? for ( var i = 10 ; i > 10 ; i - - ) and is the above same as saying: var i=10; i > 10; i = i - 1;
  9. webmanz

    Opinions To Dreamweaver

    Is Dreamweaver still relevant?
  10. webmanz

    Divi elementor beaver

    1. Can we say these Wordpress site builders appear to be analogous to Dreamweaver? 2. Who tends to gravitate towards Wordpress site builder's? 3. Are we taught about these site builders or Wordpress in Stef's courses?
  11. webmanz

    + target.innerHTML with loops

    3.52 minute mark of chapter 7 part 3 Loops Q1: Why does the + target.innerHTML added at the end (see code below) appear in ascending order on the web page rather than descending like it does in the console.log? I do realize that you can achieve descending result by adding + target.innerHTML in the front to match console.log but I'm curious why when added to the end it gives a ascending order rather than descending order? Here's the code from that lesson 3.52 minute mark of chapter 7 video part 3 Loops: function doItAgain(message){ var loopCount=5; while (loopCount > 0) { var target = document.getElementById("target"); target.innerHTML="LoopCount:" + loopCount + "<br> + target.innerHTML; <------------ referring to this line console.log("loopCount is now:" + loopCount); loopCount=loopCount -1; } console.log ("End loop"); var button= document.getElementById("looper"); button.value="Done looping!"; }
  12. webmanz

    What does i stand for in i - - ?

    Could we have used any letter besides "i" and still it work? example: for ( var t = 10 ; t > 10 ; t - - )
  13. webmanz

    Are there only 4 types of loops in js?

    Before posting I looked at w3schools found 4 same loops, I just thought there might be more, so for now I will conclude that's all the loops there is in JS.
  14. Are there only 4 types of loops in js? Are there more? while, do/while, for, for/in
  15. Do "if else" conditional statements only ever appear together? Can you have an 'else' without an 'if and vice versa?
  16. webmanz

    Can we say DOM is a JIT complier?

    Yes makes better sense now. I mistakenly thought Javascript was a functional programming language, thanks for clarifying.
  17. Can we label DOM as a JIT complier?
  18. webmanz

    Anonymous function

    This is an example of anonymous function with no name? function() The above appears to ask for a name in console log and appears as an error.
  19. webmanz

    Anonymous function

    Can we say anonymous functions have no name and no argument as well ?
  20. Chapter 5 lesson 5 5.37 minute mark of video alert("Alert: " + "stef@studioweb.com" . indexOf("@") For the above to work do I still need to type in code mentioning console log? In other words just that one line of code without any mention of console log or anything else? By anything else I mean: var email var theAt console.log In the video the js position shows up in console log using that one line of code.
  21. webmanz

    You didnt call sniffer in Chapter 5 part 2

    Yes got resolved in subsequent videos. Thanks
  22. Chapter 5 part 2 1.57 minute mark You said""When I click the button I am going to call sniffer..." The code looks like this in the video: document.getElementById("butt").onclick=function(){ sniffer("Clicked on secondP"); outSide(); If sniffer was called then in the video we would have seen an alert saying "Clicked on secondP". I also note that they was no actual second paragraph to click.
  23. Stef No definitive reason was given as to why its best practice to place getElementById at the bottom of document when used together with anonymous functions in lesson 6 chapter 2. Would anything be different if it was placed higher up in the document?
  24. webmanz

    error code colors different

    re chapter 3 lesson Javascript Errors From this: console.log("Something happened: " + message); } to this console.log("Something happened: + message); } Using Sublime the only thing that changed color for me when I removed quotes as per the video was + message, it changed color and there was a horizontal pink box stretching left to right on same code line just after + message had changed color. Unlike the video lesson the rest of my code didn't change color when I removed the quotes - they remained the same colors. Perhaps it's its something to do with my settings? Stef did mention you can adjust color error code within Sublime.
  25. webmanz

    sniffer

    example from chapter 2: function sniffer(message) Q: Is sniffer a made up word or does it have some special standing in JS with things like 'alert' and 'prompt'? Q: Are alert and prompt js keywords too?
×