Round 2 — JavaScript Time

Claire Sheek
3 min readOct 4, 2020

1 | “Describe one thing you’re learning in class today.”

My favorite thing I learned in class tonight was how to use conditionals in in/else statements, and even more so, how to clean up the code and include multiple conditionals within a single if or else statement. I also want to dive into switch cases now.

2 | “What is the difference between == and === ?”

In JavaScript, a == means that two variables are being compared, ignoring their datatype. Therefore a comparison of “2” (a string) and 2 (a number) will return true. On the other hand, when using the === operator to compare the same two variables the datatypes (string and number) would be taken into consideration and the comparison would come back as false.

3 | “What is the value of foo? var foo = 10 + '20';

Because 10 is a number and ‘20' is a string, the number will become a string when you concatenate the two together. So in this case you’re actually saying “push these characters together” instead of “add these numbers together”- therefor the answer would be foo = ‘1020’

4 | “Describe what a terminal application is.”

“With modern computers, the word “terminal” usually refers to a terminal program, or emulator, which provides a text-based interface for typing commands. This type of program is often abbreviated “TTY” and may also be referred to as a command-line interface. Terminal programs are available for all major computing platforms and are typically included with the operating system.” — techterms.com

5 | “What is the ternary operator?”

The ternary operator is frequently used as a shortcut in place of the if statement. It turns an if/else statement like this:

const age = 25;
const canRentCar;
if (age >25) {
canRentCar = ‘yes’;
} else {
canRentCar = ‘no’;
}

into this:

const age = 25;
const canRentCar= age > 35 ? ‘yes’ : ‘no’;

6 | “What are some ways to ensure that your website design or web application is accessible and user-friendly?”

A few ways to ensure a user-friendly website or web app include:

  • Mobile Compatibility
  • Fast load times
  • Straight-forward and effective navigation
  • Concise and informative headings

On top of that, when talking about accessibility, other things like informative alt text, usable forms with auto-fill capabilities, a contrasting and easy to read color scheme also need to be taking into consideration.

7 | “What are your favorite features of HTML5, and how have you implemented them in your front-end development projects?”

I really like the structure tags in HTML5. It helps keep my code easy to read easily maintained, as opposed to crowding it with a bunch of <div> tags. I give bonus point to the new tags for making website/apps more accessible.

8 | “How do you structure your CSS and JavaScript to make it easier for other developers to work with?”

I typically create a style sheet that’s just “site styles” and covers general styles that are applied throughout the full site. Then each section of code block has comments to make it easier for other developers to follow.

9 | “What’s your process for addressing browser-specific rendering problems? Do you find that a certain browser is more challenging to work with than others?”

Internet Explorer is the most challenging because it’s not caught up with the latest update but it’s still a popular browser. Some possible ways or addressing browser-specific problems (not just IE) include:

  • IE Conditional Comments
  • Adding vendor specific CSS
  • Having fallback options for CSS3 elements, such as button styles.

--

--