Blog 201

Today we are learning about conditional statements that are used to compare two or more things and then return results. It’s all still a bit confusing and almost abstract.

There are several things to memorize and it still feels a little overwhelming. One new operator to memorize is the = sign. When it is alone, it is used to assigning values to a variable. == is used for comparing two variables, but it ignores the datatype of the variable. === is used for comparing two variables but also checks datatype and compares two values.

We have also learned about the function “concat()”. It concatenates the string arguments to the calling string and returns a new string. Changes to the original string or the returned string don’t affect the other. For example: var foo= 10+ '20'; would return “1020”. In short, it will put the two items together and not add them. In order for it to add, you would have to make a return function with the addition command.

All of this is checked in the terminal. The terminal application allows you to accomplish and automate tasks on a computer without the use of a GUI. In the terminal you are able to create folders, navigate the computer and check the code that you create.

The conditional (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 execute if the condition is falsy. This operator is frequently used as a shortcut for the if statement.

There are several ways to ensure that your website design or web application is accessible and user-friendly. One of the simplest ways is to add images with Alt Text. Having keyboard navigation and the option to enlarge text could also be useful to several people. Having descriptive URLs and accessible multimedia is key. It is also important to use the ARIA, Accessible Rich Internet Applications, whenever possible.

My favorite features of HTML5 are the semantics. There are now standardized codes like, header and footer. They make it easy to understand what they do and it is easier to read. In my front end projects, I tried to use <article> and <section> to break things down. I found that I was able to finish projects faster because it was more organized. When I used <div>, I found that I kept forgetting to link the correct section to the CSS.

When I structure my CSS and JavaScript, I try to keep in mind that someone else will be reading this. I try to name my functions something that is relevant to what they are doing. In CSS they are named according to the section they correspond to in HTML. In the future, I plan on adding comments to my JS so that it is easier to understand.

I haven’t really encountered any browser-specific rendering problems. I am sure I will in the not too distant future. However, I have only used Chrome, so I am not aware of any problems.