- What are CSS selectors?
- What is the specificity of those selectors?
- What is the difference between
.class1.class2
and.class1 .class2
as a selector? - How do you center something in CSS?
- How do floats work?
- How do you get something to not display using CSS?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Refactor to use `querySelector()` instead | |
document.getElementsByClassName("message")[0].innerHTML = 'Hello World' | |
// Solution | |
// `querySelector()` will select the first item it finds | |
document.querySelector(".message").innerHTML | |
// --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build the following triangle in code | |
* | |
* * | |
* * * | |
* * * * | |
* * * * * | |
We could call it with `printTriangle(5)` where `5` is the number of rows to make |
- Queue time counter - bad instructions, while, array methods
- Return the highest counting word - reduce, charCodeAt
- Count iterations on number - reduce, while, toString, number
- Count smiley faces - regex, filter
- Sort words with numbers in them - regex, sort
Command | Description |
---|---|
!project !workingon | A quick description or link to the current project or thing we are working on |
!badges | Describe all the badge options available in the live chat window |
!team [name] | Set your team badge using the name of a Font Awesome brand: https://fontawesome.com/cheatsheet/free/brands - Ex: !team vuejs |
!flag [country-code] | Set the flag of your country in live chat. country list: https://restcountries.eu/rest/v2/all Ex: !flag us, !flag usa, !flag Germany |
!setstatus [message] | Sets your status message in live chat window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Q: Which would you prefer to get a mapped value? | |
// with a `switch` statement | |
export function getHeaderValue(headerName: string): string { | |
switch (headerName) { | |
case "content-type": | |
return headers.contentType(); | |
case "content-length": | |
return headers.contentLength(); | |
case "content-md5": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "ESNext", | |
"strict": true, | |
"noImplicitReturns": true, | |
"noPropertyAccessFromIndexSignature": true, | |
"noImplicitOverride": true, | |
"noUncheckedIndexedAccess": true, | |
"noUnusedLocals": true, |
OlderNewer