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; | |
| } | |
| .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
| .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
| .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
| 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
| 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 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
| // All odd Fibbonaci's | |
| function sumOddFibsBasic(number) { | |
| // 1. Create variables storing two latest values from the Fibbonaci numbers | |
| // and value of a final sum off only odd numbers | |
| let previousNum = 0; | |
| let currentNum = 1; | |
| let result = 0; | |
| // 2. While loop iterates as long as current value is smaller that function parameter | |
| while (currentNum <= number) { |
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
| // All odd Fibbonaci's | |
| function sumOddFibsAdv(number) { | |
| // 1. Create array with the two first values from the sequence | |
| let fibs = [0, 1]; | |
| // 2. Create the number sequence till defined parameter | |
| for (let fib = 1; fib <= number; ) { | |
| fibs.push(fib); | |
| fib = fibs[fibs.length - 1] + fibs[fibs.length - 2]; | |
| } |
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
| // Conver Arabic to Roman Numbers | |
| function romanConventerBasic(number) { | |
| // 1. Create array with roman numbers and arabic equivalents | |
| const decimalValue = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]; | |
| const romanValue = ['M','CM','D','CD','C','XC','L','XL','X','IX','V','IV','I']; | |
| // 2. New variable that will be romanized number | |
| let romanized = ''; |