2
william ovca 1 week ago

duplicate q about yesterdays webinar

Niloo used script to say hello world (new-site)
how is that different from changing the header text if a permanent change (why use script to change original?)”
  1. 2
    Niloo Ravaei
    Niloo Ravaei 1 week ago
    Hey William, 

    Using Javascript to change a header is useful because it allows you to have dynamic headers. For example, if I wanted a webpage that said Hello [UserName], and put in every user’s name, depending on who was logged in, I could have a variable called UserName that gets the name of whoever is logged in. Then I could just call that variable, which would show that user’s name. 

    If I just updated the header manually, I would have to hard-code a name. It would only change if I manually change the code every time, which isn’t useful when you want dynamic code. As I mentioned in the webinar, languages like HTML and CSS aren’t programming languages, so you can’t include any logic or automatic behavior in them. This is why we need languages like JavaScript.

  2. 2
    william ovca 1 week ago
    Thanks so much Niloo–looking forward to next tuesday on bitcoin protocol
    :  )