var variable = 10;
(()=>{
console.log(variable);
variable = 20;
console.log(variable);
})();
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
const day1Solution = (text) => { | |
const textToArrayOfStrings = text.split(`\n`) | |
const numberPattern = /\d+/g; | |
const getCodeFromString = (str) => { | |
const input = str.match(numberPattern).join(''); | |
const code = input[0] + input.slice(-1); | |
return code; | |
} | |
const output = textToArrayOfStrings.reduce((acc, str) => { | |
const code = Number.parseInt(getCodeFromString(str)); |
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
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
<div class="bg-gray-100 block min-h-screen"> | |
<div class="bg-gray-900 border-b-1 mb-4 border-gray-500 text-white p-4 shadow-lg"> | |
<h1 class="text-2xl uppercase font-bold">Tailwind Accessibility Config 🎨</h1> | |
<div class="text-xs"> | |
Github: <a href="https://github.com/optimizasean/TailwindAccessibilityConfig" target="_blank" class="font-mono">optimizasean/TailwindAccessibilityConfig | |
</a> | |
</div> | |
</div> | |
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
let pokemons = [{ | |
"name": "Pikachu", | |
"id": 25, | |
"type": "electric", | |
"ability": { | |
"primary": "Static", | |
"hidden": "Lightning rod" | |
}, | |
"moves": ["Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"] | |
}, { |
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
let pokemon = { | |
"name": "Pikachu", | |
"id": 25, | |
"type": "electric", | |
"ability": { | |
"primary": "Static", | |
"hidden": "Lightning rod" | |
}, | |
"moves": ["Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"] | |
}; |
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
let pokemon = { | |
"name": "Pikachu", | |
"id": 25, | |
"type": "electric", | |
"ability": { | |
"primary": "Static", | |
"hidden": "Lightning rod" | |
}, | |
"moves": [ | |
"Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt" |
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
let arr = [10, 20]; | |
let one, two; | |
[one, two] = arr; | |
console.log(`${one} ${two}`); | |
let obj = { prop1: 'mxiv', prop2: 'UAE' }; | |
let name, location; | |
({ prop1: name, prop2: location } = obj); | |
console.log(`${name} ${location}`); |
NewerOlder