Open alexander-lopez-s opened 2 years ago
My learning process is positively affected when I get explanations in a slow, practical and easy way, I donβt learn by given βa written exampleβ of something. Thatβs why I prefer watching YouTube tutorials or any other interactive material. Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I donβt understand anything.
My learning process is positively affected when I get explanations in a slow, practical and easy way, I donβt learn by given βa written exampleβ of something. Thatβs why I prefer watching YouTube tutorials or any other interactive material.
Watching other tutorials or interactive materials is great! the exercises in the repository are meant for practicing, they're not supposed to be the explanation that works for everyone.
Either way you should continue to practice learning from example code. As a developer you will spend much more time reading code than writing it, so the more you practice learning from examples now the easier it will be when you need to read full applications written by someone else. (which is unavoidable, companies don't have video tutorials explaining how their code bases work)
That said, what could we make that might help you? more guide videos maybe?
Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I donβt understand anything
Searching the internet is much harder than people say it is. "Just google it" ignores a lot of the hidden skills it takes to filter through all the pages and find the answers you need. Maybe you could also ask questions about searching in the Need Help channel?
I think that nested functions is something confusing at this point, I need an example using apples and tomatoes to understand better
You don't need to understand nested functions at this point. the CallStack examples were just to help you explore the debugger and visualize the CallStack, you won't need to write nested functions any time soon.
Thank you very much @colevandersWands ππ
or any other interactive material
you can check out Scrimba if you like interactive material..they have some free courses
This has been a very challenging module for me. I think I need to have a better understanding of the basic JavaScript syntaxes and concepts before jumping to functions and more advanced stuff. The current exercises in Study Lenses are beyond "basic" and console.assert is making them even harder to understand. I know we have had enough time to study and master the basis but I still need to fill some gaps in my brain. Explanations are sometimes too advanced also.
- Passing arrays as functions is super difficult. I need more examples please.
can you explain what you mean with this? do you mean passing an array into a function?
yes that is what I mean @danielhalasz passing an array into a function
ok, let's see.
const myArray = [1999, "Caracas", 'music'];
const myFunction = (someInput) => {
console.log(someInput[1])
};
myFunction(myArray);
can you predict what is the outcome of this?
I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? π€
can I just say:
const myArray = [1999, "Caracas", 'music']; console.log(myArray[1]);
Why do we need to encapsule the array in a function??
of course you can, but the purpose of functions is that they are reusable.. and there can be much more complex stuff within its scope..this was just the simplest example.. also, arrays can be much bigger are more complex.
I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? π€
yes, it is "Caracas", but to be precise, it actually occupies index 1 (which is position 2)
oh, index 1, got it, for me it's more than clear now, I wanted this explanation!!! Thank you Daniel.
for a more complex example, you can think about an array or object that contains for example data about a user profile.. and then a function that does something with a certain element inside that.. and then each time you need, you can call that function on a different user's profile data, let's say..
let's say based on the address, calculating how far it is..or whatever :)
like a group of workers in a company with their available vacation days so, the function will check how many days they have, and show the names and tell if they can already go on Hollidays?
yep
the while loop
and the switch statement
if necessary.push
function does not only pushes strings or numbers inside an array but also the value of a variable.
the while loop
andthe switch statement
if necessary.
you can if you like them, but as mentioned, you can also completely avoid them in your projects..as Louis said too..just good to know they exist..
- an arrow function is a compact alternative to a traditional function
well again, good to know to read both, they arrow functions are the newer standard..and they remind us that functions are variables too
const myFunction = (number1, number2) => {
let sum = number1 + number2 ;
return sum;
};
console.log(myFunction(2, 3));
- Therefore, I am currently solving the exercises again but this time without using any libraries, all the code in the same JS file.
yes, this can be good practice, to first do it in one file, then later separate them..
I have problems understanding things when they are explained in a fast way. Last week's lesson was hard to follow. I would prefer to have someone who explains like: Ok students, let's create a function following these steps: number 1, let's declare a variable, number 2, let's write a statement, number 3, let's create the loop, etc. instead of switching between topics, tabs, and windows and not being able to follow what they are doing. It would be nicer if the topics were explained in the most basic possible manner and, in a tutorial approach.
I sometimes have difficulties finding logic in the exercises, they are logical but I think and re-think again to find a correlation. It's not an easy task to link functions with other functions.
for ... in
and for ... of
. While the first one loops property names of an object, the second one iterates in arrays. parseInt
function and created a small addition program.
- I have problems understanding things when they are explained in a fast way. Last week's lesson was hard to follow. I would prefer to have someone who explains like: Ok students, let's create a function following these steps: number 1, let's declare a variable, number 2, let's write a statement, number 3, let's create the loop, etc. instead of switching between topics, tabs, and windows and not being able to follow what they are doing. It would be nicer if the topics were explained in the most basic possible manner and, in a tutorial approach.
yes, the first part was quick, but it was just a review of homework, that all of you were supposed to do before and it was already taking time from the class. this is why we have Discord, so if there are questions during the week about an assignment, the coaches can reply, or even have an extra Zoom session. Plus, you can rewatch the video :)
- I sometimes have difficulties finding logic in the exercises, they are logical but I think and re-think again to find a correlation. It's not an easy task to link functions with other functions.
would more detailed description in the readmes and more comments in the files help?
- I believe that my logic is not working in the exercises given lately.
can you post some code in Discord of the specific code in question?
Inside JS
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 to move on. You do not need to finish all of them but should feel comfortable that you could 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. ---
0. Asserting
let
vs.const
: You can explain the differences betweenlet
andconst
including: uninitialized declarations and reassignment. You can determine when a variable can be assigned withconst
in a program.===
and!==
operators compare strings, and can predict the result of any string comparison.console.log
: You can useconsole.log
to create program traces in the console, and to print other helpful info for developers.console.assert
: You can use theconsole.assert
for assertion testing, and can write a helpful message assertion message.1. Primitives and Operators
typeof
: You can predict thetypeof
operator's output for values from any of the 5 main primitive types.Boolean()
,String()
andNumber()
to convert between primitive types.&&
,||
,!
and? :
.&&
and||
.+
,!
and>
.2. Control Flow
if
/else
statements.while
loops.for-of
Strings: You can predict and trace simple programs that iterate through the characters of a string usingfor-of
.for
loops works by refactoring simplefor
loops intowhile
loops.break
.continue
.3. Functions
5. Unit Testing
describe
/it
/expect.toEqual
functions are defined by a testing library and made available as global variables in a testing environment. They are not part of JavaScript!file.__.js
. Sub-extensions are a convention for developers and development tools. They do not change how JavaScript inside the file works.6. ES Modules
?deps
lens to visualize the dependencies in a folder.'use strict'
!export const _ = () => {};
import { _ } from './path/to/file.js';
6. Using Functions
7. Arrays
const arr = ['items'];
.at()
and a positive or negative index.arr[4] = 'hello'
.Array.isArray(something)
const shallowCopy = [...arr];
8. Functional Array Methods
[].every
[].some
[].map
[].filter
[].find
[].reduce
9. Objects
const obj = { a: 1, b: 2 };
.