Skip to content

Instantly share code, notes, and snippets.

View damnDasha's full-sized avatar
💭
happy

Dasha Akhten damnDasha

💭
happy
View GitHub Profile
@damnDasha
damnDasha / test results
Created March 23, 2020 05:00
accessibility in reactt
accessibility test result in lighthouse
@damnDasha
damnDasha / gist:aab69c925abf9308253626b3b43e8db1
Created March 11, 2020 01:52
creating and reading context
What situations would be good to use context?
If you need to pass a prop down 1 or 2 levels, is context necessary?
Can you pass a component instance as a prop to avoid the need for context?
Can you write your own components that accept render props?
@damnDasha
damnDasha / portfolio
Created February 28, 2020 20:52
portfolio draft
home page example mobile:
@damnDasha
damnDasha / Request response cycle
Created February 23, 2020 23:00
Request response cycle
The relationship between clients and servers is kind of like asking someone for directions. client asks how to get somewhere,
and the server sends back a map and written directions, and an IP address to the location (kind of like a real address).
Then the client(person) knows how to get somewhere, and any time they are lost, can ask once again for more information.
The client (browser) does this as many times as necessary until they have all the info
https://repl.it/join/xdebtgiq-damndasha -- totally forgot how to do arrays for a second
https://repl.it/join/tuqpjvvd-damndasha -- started doing it right, but too many quotes around the values.. why are there not
supposed to be quotes around the values that don't need to changed?
https://repl.it/join/jtvjvktj-damndasha -- got it wrong only on the plural vs singular. Also I keep trying to put return at the bottom
https://repl.it/join/cnqhises-damndasha -- could not do this one, i even copied the code and it still isnt right
function getTokens calls a rawString
toLowerCase converts this to lower case
split -- splits a string into an array of substrings, and returns the new array. In this case, any false strings
will not appear in the resulting array.
function mostFrequentWord calls text using a good ol fashioned loop. a for loop executes a block of instructions a set
number of times.
this loop will execute as many times as the parameters appear in the text.
https://repl.it/join/ataewlpk-damndasha --
https://repl.it/join/bnghwftk-damndasha -- yay I did it right and it's different from the solution! but I forgot to add return
https://repl.it/join/uhkfjykg-damndasha -- forgot to add a space in quotes
https://repl.it/join/ksnzukta-damndasha -- got that one right
https://repl.it/join/vaxjdhhi-damndasha i could only do the for loop that we learned about, but I got that one right wooooo
https://repl.it/join/cxsnnbea-damndasha this one was easy because I just copied the previous one but i got it right!
https://repl.it/join/ruyhfuui-damndasha didnt really know how to do this one, but i got the first half right
https://repl.it/join/qrjuvypx-damndasha i did it right but I put quotes around the item1 etc. so it didnt work. Ok its still doesnt work even though I checked the solution? I hit refresh and NOW it works?? Okurrrr
https://repl.it/join/uehxtrla-damndasha did it right, but the list.push goes first, not the ‘return’ which is what i did
https://repl.it/join/oevihkwk-damndasha nailed it! Except I first entered numbers one and three becuase I fotogt that 0 is actually the first number.
https://repl.it/join/hsrjqmwd-damndasha got it but why can’t i just put the number in?
https://repl.it/join/trebgruc-damndasha //i got the function right but mine only turns green, even though i checked and the solution is the same//
https://repl.it/join/cgbofzyx-damndasha //i did too much, simpler is better