100 Days of Code: Day 33

Home / Technology / Web Development / 100 Days of Code: Day 33
I finished modifying my code snippets, despite the fact that WordPress seems to have a mind of its own. I also reached the end of my journey with Codecademy. Read the post to find out why.

[vc_row css=”.vc_custom_1526680382655{margin-top: 15px !important;margin-bottom: 60px !important;padding-right: 10% !important;padding-left: 10% !important;}”][vc_column][vc_progress_bar values=”%5B%7B%22label%22%3A%22Progress%22%2C%22value%22%3A%2233%22%2C%22color%22%3A%22blue%22%7D%5D” title=”100 Days of Code, Round 1″ percentage_value=”27″ title_color=”#3e3e3e” bar_color=”#1b7da9″ track_height=”20px” track_color=”#e7f6fc” m=”20″ extra_class=”” units=”%”][/vc_column][/vc_row][vc_row][vc_column][vc_custom_heading text=”Goals For Today:” font_container=”tag:h3|text_align:left” use_theme_fonts=”yes”][ultimate_icon_list icon_size=”16″ icon_margin=”20″][ultimate_icon_list_item icon_type=”custom” icon_img=”id^4091|url^https://www.blissfullemon.com/wp-content/uploads/2018/05/done.png|caption^null|alt^null|title^done|description^null”]Finish modifying the code blocks from days 1-30[/ultimate_icon_list_item][ultimate_icon_list_item icon=”Defaults-ban”]Continue exploring the new features of JavaScript ES6 by continuing the Codecademy Learn JavaScript: Introduction course[/ultimate_icon_list_item][/ultimate_icon_list][vc_custom_heading text=”The Good:” font_container=”tag:h3|text_align:left” use_theme_fonts=”yes”][vc_column_text]I made some progress with my website. It took a few hours, but I finally finished modifying the CSS/HTML for my old 100 Days of Code posts so they no longer use the old code formatting plugin. I also learned a bit more about JavaScript ES6 before hitting a bit of a roadblock.[/vc_column_text][vc_custom_heading text=”The Bad:” font_container=”tag:h3|text_align:left” use_theme_fonts=”yes”][vc_column_text]So, I didn’t realize when I started taking this Codecademy course that the interactive tutorials are free but if you want do any of the projects, you have to pay for a membership. I knew that some of the content was restricted, but the lessons themselves are way too brief to merit spending any more time on this without being able to do the projects.

It looks like I will be moving on to something else instead of trying to continue.[/vc_column_text][vc_single_image image=”5472″ img_size=”full” style=”vc_box_outline” onclick=”link_image”][vc_custom_heading text=”Notes/Comments:” font_container=”tag:h3|text_align:left” use_theme_fonts=”yes”][vc_column_text]My primary focus for today was finishing the code block modifications from the previous blog posts. After that, it was all about learning more about JavaScript ES6. I obviously didn’t make it as far as I would have liked, but I am still already noticing some big differences. I will find another method of learning the rest later on. For now, I thought I might share what I have found.

Most of the concepts are very much the same as the standard “beginners JavaScript,” which is what I am choosing to call Vanilla JS from now on. Still, I thought I might make some notes to refer to later, especially where there are differences between beginner JS and ES6.

Primitive Data Types in JavaScript ES6:

  1. String : a series of characters (including numbers) that is used to represent text
  2. Number : any positive or negative numerical value
  3. Boolean : a data type that can be either true or false
  4. Null : a reference or pointer to a nonexistent or invalid object
  5. Undefined : the default data type given to variables that have been declared but not yet initialized with another value/data type
  6. Symbol : a new primitive data type used with private objects and properties. I don’t quite understand symbols yet, so this is going to require a bit of research and learning before I can truly say what it is that they are.

String interpolation (i.e. concatenating strings with string variables) can still be done in the same way as beginner JavaScript.

let myName = "Aimie";
console.log("My name is " + myName);

Console Output

» My name is Aimie

New in ES6, there is another way to do this using backticks instead of quotation marks and the format of ${variableName} to directly insert variables into the string without having to concatenate them with the plus sign. It looks like this:

let myName = "Aimie";
let myCity = "Dayton, Ohio";
console.log(`My name is ${myName}. My favorite city is ${myCity}.`);

Console Output

» My name is Aimie. My favorite city is Dayton, Ohio.

At first, this seems a bit more complicated, but I can definitely see how this might be extremely useful with long strings. I can’t tell you how many times I have forgotten the + between my string and variable, or more commonly, between my variable and that end punctuation. It’s actually kind of a pain in the butt to be grammatically correct, but this will make adding all those commas and end punctuation much easier within my string.

Now to begin my quest for finding another method learning ES6… Wish me luck![/vc_column_text][/vc_column][/vc_row]

Let's chat!

%d bloggers like this: