Week Two of Javascript

  1. Describe one thing you’re learning in class today.
    Our last class we dealt with the use cases between dot notation and bracket notation when trying to access arrays. It’s something I have heard a few times through this course, but actually having several examples on when to use bracket notation was helpful.
  2. What is "use strict";? What are the advantages and disadvantages to using it?
    It’s prevents the use of variables that are not declared for one. It also reveals “silent errors”, and prevents syntax that is defined in future versions of ECMAScript. I just looked all that up, but it makes sense to me.
  3. Explain function hoisting in JavaScript.
    So from what I found, it looks like it allows declarations to be called, before they are defined. So if you call myFunction(), and define it later in the code, it will store that in it’s memory, and run the function as expected. It only works on declarations, and not initializations, meaning that if I console.log(example), but don’t define it until later in the code, it will return undefined.
  4. Explain the importance of standards and standards bodies like ECMA.
    I haven’t really looked this up, but we all need to commit to the same changes. It’s like how we standardize micro-usb’s, unless you’re apple >:(. It makes it so we don’t need a different charger for every device we own. It saves everyone time, money and space, and is ultimately convenient. Our browsers and software we use to run them are the same. While there are many different software's out there, for each of them they need a board that will help finalize changes so that we can all be on the same page.
  5. What actions have you personally taken on recent projects to increase maintainability of your code?
    I make sure that I go above and beyond on each of my projects. When it asks to translate one word to pig-latin, I do a sentence. When we did RPS, I made my own on the side with visuals. I make sure the code works beyond what is asked. I’m not going to short change myself out of my education.
  6. Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?
    So that pre-existing webpages don’t lose their functionality, and everyone can work in the same context. I think I understand what is being asked. Maybe.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store