What I Learned in Week 3

JavaScript

This week we took a step back from HTML and CSS and started the week with setting up our computers.

We created a GitHub account and focused on terminal commands that would expedite the way we would interface with our computer.

Command Review

mkdir 👉🏻 make directory 

touch 👉🏻 create a file

mv 👉🏻 rename a file 

rm -rf 👉🏻 remove a file permanently

../ 👉🏻 move up one level

cd ~ 👉🏻 start from beginning

GitHub Terminal Commands

git add 👉🏻 add the files that were changed (place in box)

git commit -m 'comment' 👉🏻 commit the added files (add label to box)

git push 👉🏻 push up the changes (send package)

This information would be essential in expediting changes that were made to our code.

JavaScript

JavaScript is a high-level, object-oriented, multi-paradigm programming language.

ES6/2015 - ES11/2020 👉🏻 Known as Modern JavaScript

We learned about Primitive Data Types

  1. Number 👉🏻 used for decimals and integers let age = 23

  2. String 👉🏻 sequence of characters 👉🏻 used for text let firstName = 'Jonas' it is important to note for a string to not be considered a variable it wil need quotation marks wrapping the string.

  3. Boolean 👉🏻 Logical value type that can be true or false 👉🏻 used for decision making let fullAge = true

  4. Undefined 👉🏻 Value taken by a variable that is not yet defined (empty value)

Declaring a Variable

Declaring a variable is one way of giving a variable a value.

let myBestFriend = 'Tom';
console.log(myBestFriend); //? Tom 

We can also reassign that variable.

myBestFriend = 'Grace';
console.log(myBestFriend); //? Grace

We no longer need the let when reassigning the variable.

It was an important week as we forge ahead into the wonderful world of JavaScript