Tuesday, June 9, 2015

More Progress

As I continued my course at code academy, a lot of the lessons were just simply combining concepts which I had already learned to make more complex code. This was fun and rewarding as I got to see most of what I had learned work together in new ways.

Next I learned about substrings and how to manipulate them. A substring is simply just part of a string. For example, in your email inbox, the first few lines of the email are displayed. This is a substring of the full string, the email. You can display a substring of a string by using the .substring(x,y) code after a string. The x is the place where you want the substring to start and the y is the place where you want the substring to end. Below is an example of a few substrings printed out using the console.log function.











Next I moved onto variables. Variables are a way to save values by declaring a name for it. This is done with the command "var" followed by the name which you are declaring for the variable, then an equals sign and finally the value. Below is a simple example of declaring a variable then printing it out.











Next I learned how to change a variables value. This is just as easy as redeclaring the variable as if it was a new one on a different line.

I have made a lot of progress on the fundamentals of Javascript and this after learning about variables, I actually finished the first Program on Javascript at codeacademy.

No comments:

Post a Comment