Aside from illness and distractions, It was hard for me to understand and comprehend what I was learning throughout the first lesson.
I also learned about “confirm” and “prompt”. To describe a “Confirm”, the best example I can think of is when you are in the middle of typing a message or status update on Facebook and you don’t send it and you try to navigate from the page and you get a message asking if you’re sure you want to navigate away. You either press “OK” or “cancel”.
Prompt is when a little box pops up and… wait… as I’m writing this, I feel like a prompt is very similar to a Confirm. A prompt is an interactive box, asking for input. Similar to when you go on certain sites and a box pops up and asks “what’s your age” and you have to enter your age. You have to input information and dependent on what you enter, the next step happens.
I then learned there are different types of data:
- Numbers– you guessed it, 123456, etc. you use them for math.
- Strings– words, spaces, letters a-z and even numbers.
- Booleans– Can only determine true or false statements.
The thing with strings , you need to put them in quotation marks. you don’t with numbers. Booleans you use with If/Else statements.
I then learned about console.log which is the syntax to printout, or make it seen on the screen, what you want the viewer to see.
Next came If/Else statements. Despite the fact that most of the plans revolve around the If/Else statements I was just.not.getting.it. Maybe it was because I was sick, or because I was distracted and did this unit so slowly and doing an exercise or two and not coding for a day or more until the next time I came to it. It sucked. I kept having to go back and review what I had previously done. I had to reread instructions and at one point I redid OLD lessons just to get back into the rhythm of things. I felt so lost I just figured I wouldn’t have the abilities to do more than just front-end design. Was I destined to just know HTML/CSS?
I’m not going to lie, I kind of just went through the motions of the lessons and all the while in the back of my head I just kept asking myself “What IS this? How does this fit into the scheme of things? am I EVER going to understand this? WTF?!?!” I just kept hoping that somewhere along the way something would just click and the clouds would part and I could see and understand exactly what was happening.
That breakthrough sort of happened in Lesson 2. Lesson 2 uses most of what you learned in the previous lesson and you design a “Choose Your own Adventure” game. In the game Batman needs to go shopping and you use variable, if/else statements to navigate the game. It’s really cute and that’s where you can sort of understand the Why’s and How’s: why you have to define variables, Why and How console.log REALLY work together with the If/Else statements. I loved it.