WOW look at what I've learned!

BrandonPerry
3 min readDec 7, 2020
  1. Describe one thing you are learning in class today?

Today I learned how to create a rock, paper scissor game with JavaScript for two players. At first, I thought it would be a difficult task but writing the code piece by piece and talking it out made it more comfortable. In short first declare your players, create prompts and logical conditional code that would take the player’s input and compare to determine the winner for every possible outcome.

2. What is the difference between == and === ?

The only difference between == and === is whether there’s a strict or non-strict comparison to something else. For example, 3 == ‘3’ would be true because both contain the number 3. Furthermore, 3 ===’3' would be false because thought both are number 3, but one is a string, and the other is a number.

3. What is the value of foo? var foo = 10 + ‘20’;

The value of foo would be ‘1020’; this known as concatenation. If the + operator’s right-hand side is a string, JavaScript will attach the left-hand side to a string and vice versa.

4. Describe what a terminal application is.

A terminal application is a fast, powerful application that allows you to type commands — lines of text, instructions to control your computer. Examples of terminal applications are command-line tools and shells like Command Prompt, PowerShell, and Windows Subsystem for Linux.

5. What is the ternary operator?

The ternary operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to run if the condition is false. This operator is frequently used as a shortcut for the if statement.

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

Some ways that I’m finding to ensure user-friendliness is building my responsive websites using a mobile-first design approach. I try keeping the navigation area simple, by naming each page appropriately and clearly. I also try to include clear call-to-actions and make all content simple to digest.

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

Some of my favorite features of HTML5 are the section, nav, and footer elements. I like using the section element to group my web content in different sections, plus I read applying sections instead of divs makes for better code and easier accessibility. I normally use the nav element to link the other pages on my sites. I use the footer element to list the copyright information and social media links. I also use it add in more of the primary color as the background to break up the white space on my sites.

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

In my opinion, the best way to structure your CSS and js for easier readability is to use comments through your code to explain what is going on. This way, if another developer or yourself years later come back to the code, it can be understood.

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?

I add !DOCTYPE html at the beginning of my code because browsers search for it, and if I apply it to every code, I can expect my site would render as expected.

I do find specific browsers require additional CSS code like -moz, -ms, -o, and — webkit specific to that browser. I also use CSS resets to override the default css styling of browsers.

--

--