Open AnitaSharma2022 opened 2 years ago
Week 1
Week 2
Hello my friend
Week 3
Send me this command please
On Thu, 20 Oct 2022, 8:17 am Anita @.*** wrote:
Week 3
- I have pushed my progress to my fork of exercises repo https://github.com/AnitaSharma2022/inside-js
I Need Help With:
- Arrow functions
What went well?
- Arrays and some of its functions
What went less well?
- Making program solutions using array methods and arrow functions.
Lessons Learned
- Array methods
- String methods
Sunday Prep Work
- Arrays
— Reply to this email directly, view it on GitHub https://github.com/HYF-Class19/home/issues/267#issuecomment-1285057264, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2M57B3BXRN5IZNNIK3RJNDWEDWYZANCNFSM6AAAAAAQ6QCZPQ . You are receiving this because you commented.Message ID: @.***>
Week 4
Learning 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. Multiple Interactions
const obj = { a: 1, b: 2 };
.