lab-brussels-1 / home

Home repository for Lab Brussels 1.
https://lab-brussels-1.github.io/home
MIT License
4 stars 5 forks source link

Cristobal: Welcome to JS - 3 weeks #298

Open alexander-lopez-s opened 2 years ago

alexander-lopez-s commented 2 years ago

Learning Objectives

all of these skills are limited to short, single-page programs written with Just Enough JavaScript

Priorities: πŸ₯š, 🐣, πŸ₯, πŸ” (click to learn more)
There is a lot to learn in this repository. If you can't master all the material at once, that's expected! Anything you don't master now will always be waiting for you to review when you need it. These 4 emoji's will help you prioritize your study time and to measure your progress: - πŸ₯š: Understanding this material is required, it covers the base skills you'll need for this module and the next. You do not need to finish all of them but should feel comfortable that you could do them with enough time. - 🐣: You have started all of these exercises and feel you could complete them all if you just had more time. It may not be easy for you but with effort you can make it through. - πŸ₯: You have studied the examples and started some exercises if you had time. You should have a big-picture understanding of these concepts/skills, but may not be confident completing the exercises. - πŸ”: These concepts or skills are not necessary but are related to this module. If you are finished with πŸ₯š, 🐣 and πŸ₯ you can use the πŸ” exercises to push yourself without getting distracted from the module's main objectives. ---

1. What is Programming

What is a program? What is a programming language? How do programs and people fit together?

2. Just Enough JavaScript

Go in depth on JavaScript you need to know for writing interactive text-based programs in the browser. Along the way you will learn how each language feature works in small programs.

3. Understanding Programs

Learn how to understand a larger programs by finding connections between the details and the big picture. By the end of this chapter you will know how to read a new program and do a simple code review.

4. Developing Programs

Learn to modify and write larger programs in JavaScript. You'll cover many of the hidden skills necessary to develop quality software and to work collaboratively on a code base.

alexander-lopez-s commented 2 years ago

Week 1

I Need Help With:

What went well?

What went less well?

-Sometimes it is really hard understanding concepts, I need to read twice and sometimes trice to get it.

Lessons Learned

Sunday Prep Work

-I will move to 2-just-enough-javascript and complete it before Sunday.

colevandersWands commented 2 years ago

I would like to know the difference between document.getElementById() and document.querySelector

.getElementById("hoy") finds the element with id="hoy". .querySelector is more complicated, you can read about it here.

I want to know a list of styling syntaxes in JS. EX: document.getElementById("nav-bar").style.width = "400px";

kind of, sort of, anything you can write in CSS you can use as a style property in JS. but not always. it's quite complicated and filled with exceptions.
it's generally better to write CSS classes and use JS to change an element's class instead of changing it's styles directly

you'll cover the DOM manipulation in depth during Separation of Concerns, so no plenty of time. This will also get easier after you learn about the debugger on Sunday

alexander-lopez-s commented 2 years ago

@colevandersWands thanks for answering my questions. I have to say that sometimes I feel stressed when I see so many syntaxes and so many situations going on, and not being able to fully understand. Any suggestions?

colevandersWands commented 2 years ago

My suggestion for now is to focus only on what's in Welcome to JS. It covers a lot of important skills with the smallest amount of syntax possible. After you've learned these skills on simple code it will be much easier to learn new code.

There's still 10 weeks before you cover the DOM in class, so take your time for now

alexander-lopez-s commented 2 years ago

Week 2

I Need Help With:

What went well?

I have a clear understanding of the following situations:

A. A variable is a β€œstorage” for data. B. If I use Cons I can't rename it later. C. Variable names are case sensitive and special characters are not allowed as names. D. I understand the use of loops and conditionals.

What went less well?

Lessons Learned

Sunday Prep Work

colevandersWands commented 2 years ago

How do we start a scope? What indicates me "this is a scope, Cristobal"? and what tells me "here ends a scope, Cristobal"?

Curly braces, that's all. everything between curly braces is a new scope:

// outer scope

{
  // new scope begins 
  // ...
  // new scope ends
}

// outer scope

Why do we have Var, Let, Cons, when we can perfectly use only one of them in our programs? What is the rule? Which one should I use?

Never use var, there's no good reason too anymore and it's more likely to cause tricky bugs (because of hoisting, don't worry about what that means).

Between const and let, it's preference. You can always use let, but it's helpful to use const when you can so people know the variable won't be changing.

Does a Front-end developer need to know JS? (This question is asked to know if I need to master JS).

200%! Frontend development is all about JavaScript, even things like React are just JavaScript behind the scenes. The better you know JS the better you can learn everything else.

alexander-lopez-s commented 2 years ago

Thanks @colevandersWands :)

alexander-lopez-s commented 2 years ago

Week 3

I Need Help With:

What went well?

Cat-advisor Bowling bar reservation form

What went less well?

Lessons Learned

Sunday Prep Work

danielhalasz commented 2 years ago
  • What happens with the information that a user inputs in a form?

well, it will be in the memory of the computer until the program is running and you can decide what you want to do with it.. to use it for further calculation, to get data for a database, to change the DOM, to log it in the console, etc..

  • Why do we want to tag a the whole HTML tag <body>

well, maybe to do something with the entire body? πŸ˜„ like change the font everywhere..or whatever

  • I had hard time figuring out how to get the value from a checkbox and convert it to Boolean. Finally I found this syntax which works perfectly: const isAllergic = document.getElementById("is-Allergic").checked;

well, that's what the dom-io.js functions are for :) feel free to use them for now, those help to make your life easier for now.

Cat-advisor Bowling bar reservation form

nice work on these two!! great to see your dedication!

alexander-lopez-s commented 2 years ago

Questions answered, thanks @danielhalasz :D