Open alexander-lopez-s opened 2 years ago
Week 1
document.getElementById()
and document.querySelector
I have a clear understanding of the following concepts:
I know "use strict" will help me catch my errors.
I understand that a variable declared inside curly brackets { } means we are in front of a "block scope".
I can perfectly log a message in the console.
I know what strings, numbers, and booleans are.
I can perfectly link my HTML file to the JS one.
-Sometimes it is really hard understanding concepts, I need to read twice and sometimes trice to get it.
-I will move to 2-just-enough-javascript and complete it before Sunday.
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
@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?
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
Week 2
Var,
Let
, Cons
, when we can perfectly use only one of them in our programs? What is the rule? Which one should I use?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.
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.
Thanks @colevandersWands :)
Week 3
<body>
? Example: document.getElementsByTagName(tagName);
Cat-advisor Bowling bar reservation form
- 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.
nice work on these two!! great to see your dedication!
Questions answered, thanks @danielhalasz :D
Learning Objectives
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.
/describing-programs
: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.