This file contains hidden or 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 arrayOne = [1, 4, 5, 7, 3, 8, 1, 9]; | |
| const arrayTwo = [3, 7, 1, 12, 9, 5, 24, 16]; | |
| function diffArrayInt(array1, array2) { | |
| // 1. Return a new array that will follow this rules | |
| return ( | |
| // 2. Combine two arrays | |
| [...array1, ...array2] | |
| // 3. Check each element if it's unique return in a new array | |
| .filter((item) => !array1.includes(item) || !array2.includes(item)) |
This file contains hidden or 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 arrayOne = [1, 4, 5, 7, 3, 8, 1, 9]; | |
| const arrayTwo = [3, 7, 1, 12, 9, 5, 24, 16]; | |
| function diffArrayInt(array1, array2) { | |
| // 1. Create new array | |
| const newArr = []; | |
| // 2. Combine the two array and sort | |
| const orderedArr = [...array1, ...array2].sort(); | |
| // 3. Loop through the ordered Array |
This file contains hidden or 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 arrayOne = [1, 4, 5, 7, 3, 8, 1, 9]; | |
| const arrayTwo = [3, 7, 1, 12, 9, 5, 24, 16]; | |
| function diffArrayBasic(array1, array2) { | |
| // 1 - Create empty string to be returned | |
| let newArray = []; | |
| // 2 - Function that finds unique element in regards to the other array | |
| function uniqueElement(first, second) { | |
| // 3 - Loop through an array |
This file contains hidden or 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
| .new-input.new-input.new-input { | |
| color: blue; | |
| } | |
This file contains hidden or 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
| .new-input[type="text"] { | |
| color: blue; | |
| } | |
This file contains hidden or 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
| .old-input[type="text"], | |
| .old-input[type="email"], | |
| .old-input[type="number"] { | |
| color: red; | |
| } | |
| .new-input { | |
| color: blue !important; | |
| } |
This file contains hidden or 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
| .old-input[type="text"], | |
| .old-input[type="email"], | |
| .old-input[type="number"] { | |
| color: red; | |
| } | |
| .new-input { | |
| color: blue; | |
| } |
This file contains hidden or 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
| .old-input[type="text"], | |
| .old-input[type="email"], | |
| .old-input[type="number"] { | |
| color: red; | |
| } |
This file contains hidden or 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
| // 0-1-0 + 0-1-0 + 0-1-0 = 0-3-0 | |
| .form__field__input:placeholder-shown + .form__field__label { | |
| color: red; | |
| } | |
| // 1-0-0 + 0-0-1 + 0-0-1 = 1-0-2 | |
| #wrapper ul li { | |
| color: red; | |
| } |
This file contains hidden or 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
| // Zmodyfikowany styl | |
| .form__field__input:invalid + .form__field__label { | |
| top: -.5rem; | |
| font-size: .6rem; | |
| } | |
| // Oryginalny styl - reset modyfikacji jeśli placeholder istnieje | |
| .form__field__input:placeholder-shown + .form__field__label { | |
| top: .35rem; | |
| font-size: 1rem; |