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
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "ESNext", | |
"strict": true, | |
"noImplicitReturns": true, | |
"noPropertyAccessFromIndexSignature": true, | |
"noImplicitOverride": true, | |
"noUncheckedIndexedAccess": true, | |
"noUnusedLocals": true, |
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": |
- 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
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
// Challenge: Pull out the "character" value from the following URL string | |
// http://localhost:3000/characters/new?character=Art+Vandelay | |
// Using the `URL()` API, we can pull out the search params without needing to regex, split, or other wonkery | |
const params = (new URL(url)).searchParams | |
params.get('character') // Art Vandelay | |
// `URL()` will also handle uri decoding -- urls with %20, +, etc. |
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 |
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
// Challenge: Refactor the `render()` method with declare all variables at top | |
render() { | |
return ( | |
<li> | |
<div className="profile-card"> | |
<header className="profile-header" onClick={this.toggleClass}> | |
<img src={this.props.profile.image} alt={this.props.profile.name} /> | |
<h2>{this.props.profile.name}</h2> | |
</header> |
NewerOlder