Open MMikhailova opened 2 years ago
Week 1
Explicit Coercion. I understand this topic in general and have no problem with exercises but I have no idea how to apply them in my code.
I am studying all topics slowly but surely. So far I've reached only 2-control-flow and I also finished functions-and-unit-testing. In order to practice HTML&CSS along JS, I am working on the quiz. I have some fun with this))
Explicit Coercion. I spent a lot of time figuring out how Number() and Boolean() work...I'm still not very confident.
NaN compares unequal (via ==, !=, ===, and !==) to any other value -- including to another NaN value. Use Number.isNaN or isNaN to most clearly determine whether a value is NaN.
Explicit Coercion. I understand this topic in general and have no problem with exercises but I have no idea how to apply them in my code.
Explicit coercion isn't really something you use, it's something you study so you understand how operators work (&&
, ===
, +
, ...) and so you can find+fix coercion bugs in your code. When you learn about the DOM you will need to cast strings to numbers, but that's about it
@colevandersWands thank you! Your comments always reassure me:)
Week 2
Is there any difference between
const returnAnEntry = (array, index) => {
return array[index];
};
and
const returnAnEntry = (array = [], index = 0) => {
return array[index];
};
Side-Effects: 🥚 Explain what side-effects are with an example. 🥚 Avoid side effects when writing your own functions. 🐣 Write tests to check if a function has side-effects. 🐣 Fix side-effects in buggy functions.
🥚 Create a new array in my program 🥚 Adding and Removing Items 🥚 Reading Items: Access a specific item in an array using square brackets a positive index. 🥚 Updating Items 🥚 Iterating Over Arrays
Online classes work worse for me since I can't hear well all the coaches and especially questions/answers in the class. I will try to attend the next Sunday class.
@MMikhailova Hope you are using headsets. for me with headsets audio is better.
@minjupgeorge thank you for the advice, dear. I tried both options but I could hear only those who were unmuted:(
Is there any difference between
const returnAnEntry = (array, index) => { return array[index]; };
and
const returnAnEntry = (array = [], index = 0) => { return array[index]; };
the difference is that in the second case you give default values to the parameters..so if nothing is passed into the function, it will execute with those.. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
Week 3
This week assignment. I have finished them and helped a classmate.
Also refactoring logic from a program into a separate function, reverse-engineering and array manipulation.
Sometimes I feel like I do something wrong or not good enough but I can't figure out what the problem is.
Sometimes I feel like I do something wrong or not good enough but I can't figure out what the problem is.
welcome to the life of developers 😆
Week 4
Sometimes I (not only me) struggle with explaining the code I've written or with a question formulation. It happens because there are a lot of new notions, concepts and etc. so it is not easy to remember all of them and use them correctly. Moreover, English is the third language I speak so I try to practice as much as possible.Therefore classes when we need to present our work or explain something are very helpful for me.
/lesson-plans/util-functions/1-primitives/exercises These exercises were pretty easy for me since I have done a lot of similar ones in Study lenses.
Now I am studying 9. Objects.
classes when we need to present our work or explain something are very helpful for me.
this is a good point and indeed, when working in teams, it would be nice that everyone practice this skill a little bit..so each person shares the screen to present and talk about code.
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 };
.