BlogPost_202

Landon Powell
2 min readMay 15, 2021

What’s something that’s been confusing? How would you explain it to someone else?

I think the most confusing thing for me is trying to piece together how certain functions work in tandem with each other. To understand it you almost have to break it down and look at it piece by piece and explain to yourself exactly what that line of code is doing.

What is “use strict”;? What are the advantages and disadvantages to using it?

It is an expression that only allows JavaScript to be run in strict mode. In this mode, you cannot use undeclared variables. This can help you writed cleaner code, can help you debug and find your errors, and makes it easier to write ‘secure’ JavaScript. However, you have to declare all of your variables before you use the function test, cannot repeat variable names, and you can’t use some methods that JavaScript has to offer.

Explain function hoisting in JavaScript.

Hoisting is basically defining an element at the beginning of your code and then inputting said element in a function and ‘hoisting’ the use of the element.

Explain the importance of standards and standards bodies like ECMA.

Web standards often provide a set of rules that a web developer can follow. Following these rules can reduce development and maintenance time, offer backward compatibility, and can help increase your chances of success.

What actions have you personally taken on recent projects to increase the maintainability of your code?

I usually write comments that help me remember what I was working while coding. I also condense my code the best I can while still understanding what it does. Finally, I use function and element names that correspond to what I what the function to do that way I can easily go back and read it easily.

Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?

You are highly likely to encounter global variable name clashes. There is only one namespace so changing anything could result in getting those errors.

--

--