Tasks
Π·Π°ΠΌΡΠΊΠ°Π½ΠΈΠ΅
function closure() {
let count = 0;
return function coun1t() {
return count++;
}
}
let count1 = closure();
console.log(count1());
console.log(count1());
console.log(count1());debounce
bubble sort
reduce
random min man
Redux
createStore(redux)
Or
insertAfter
querystring /queryparams
Sum function with different number of params
sum(1, 2, 3) => 6
sum(3, 4) => 7
Array
Deep of Array
Currying
To make a function multiplyAll which takes an array of integers as an argument. This function must return another function, which takes a single integer as an argument and returns a new array.
multiplyAll which takes an array of integers as an argument. This function must return another function, which takes a single integer as an argument and returns a new array.The returned array should consist of each of the elements from the first array multiplied by the integer.
multiplyAll([1, 2, 3])(2) ======> [2, 4, 6];
ΠΠ°ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ sum(a,b) ΡΠ°Π·Π½ΠΎΠ΅ ΠΊΠΎΠ»-Π²ΠΎ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠΎΠ²
Sport
Remove duplicates from the list
Or
Return an array containing the numbers from 1 to N, where N is the parametered value. N will never be less than 1.
If the value is a multiple of 3: use the value 'Fizz' instead
If the value is a multiple of 5: use the value 'Buzz' instead
If the value is a multiple of 3 & 5: use the value 'FizzBuzz' instead
Given a string of words, return the length of the shortest word(s).
Square every digit of a number and concatenate them.
For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1.
Note: The function accepts an integer and returns an integer
Find The Duplicated Number in a Consecutive Unsorted List
Objects
Get output:

Solution:
Count all the occurring characters in a string. If you have a string like aba, then the result should be {'a': 2, 'b': 1}.
ΠΠ°Π½ ΠΎΠ±ΡΠ΅ΠΊΡ {name: 'ΠΠ΅ΡΡ', 'surname': 'ΠΠ΅ΡΡΠΎΠ²', 'age': '20 Π»Π΅Ρ', }. ΠΠ°ΠΏΠΈΡΠΈΡΠ΅ ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠΈΠ΅ Π·Π½Π°ΡΠ΅Π½ΠΈΡ Π² ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΠ΅ name, surname ΠΈ age. Π‘Π΄Π΅Π»Π°ΠΉΡΠ΅ ΡΠ°ΠΊ, ΡΡΠΎΠ±Ρ, Π΅ΡΠ»ΠΈ ΠΊΠ°ΠΊΠΎΠ΅-ΡΠΎ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ Π½Π΅ Π·Π°Π΄Π°Π½ΠΎ - ΠΎΠ½ΠΎ ΠΏΡΠΈΠ½ΠΈΠΌΠ°Π»ΠΎ ΡΠ»Π΅Π΄ΡΡΡΠ΅Π΅ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ ΠΏΠΎ ΡΠΌΠΎΠ»ΡΠ°Π½ΠΈΡ: {name: 'ΠΠ½ΠΎΠ½ΠΎΠΌ', 'surname': 'ΠΠ½ΠΎΠ½ΠΈΠΌΠΎΠ²ΠΈΡ', 'age': '? Π»Π΅Ρ'}.


detectCollision function
The detectCollision function searches through an array of rectangles and returns the first rectangle that the given point is inside of.
Use destructuring and a higher-order function to make this code cleaner. You might want to use the new array method find, which takes a function as argument, and returns the first element in the array (the element, not its index) for which the function returns true.
String
Palindrome
A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. This includes capital letters, punctuation, and word dividers.
Anagram Detection
An anagram is the result of rearranging the letters of a word to produce a new word (see wikipedia).
Note: anagrams are case insensitive
Complete the function to return true if the two arguments given are anagrams of each other; return false otherwise.
or
Reverse
Number
Is a number prime?
Century From Year
Node Js
/file?rout=text.txt
ΠΠ°ΠΊ ΠΎΡΠΏΡΠ°Π²ΠΈΡΡ ΡΠ°ΠΉΠ», ΠΊΠΎΡΠΎΡΡΠΉ Π½Π°Ρ ΠΎΠ΄ΠΈΡΡΡ Π² ΠΏΡΡΠΈ ΡΠΎΡΡΠ°?
TS
To create functions
Π’Π°ΡΠΊΠ° Π½Π°Π΄ΠΎ ΠΎΠΏΡΠ΅Π΄Π΅Π»ΠΈΡΡ ΡΡΠΎ Π² ΡΡΡΠΎΠΊΠ΅ Π²ΡΠ΅ ΡΠΊΠΎΠ±ΠΊΠΈ ΡΡΠΎΡΡ Π²Π°Π»ΠΈΠ΄Π½ΠΎ ΠΈ ΠΏΠΎΠΏΠ°ΡΠ½ΠΎ
fn("(|)") - return true
fn ("{(})") - return false
-------------------------------------------------------------------------------------------------------------------------------------------------------------
ΠΠΎΡΡΠΈΡΠ°ΡΡ ΠΊΠΎΠ»-Π²ΠΎ ΡΠΈΡΡ Π² ΡΠΈΡΠ»Π΅
-------------------------------------------------------------------------------------------------------------------------------------------------------------
ΠΠ΅ΡΠ΅ΠΌΠ½ΠΎΠΆΠΈΡΡ ΠΌΠ°ΡΡΠΈΠ² ΡΠΈΡΠ΅Π» (ΠΊΠΎΠ»-Π²ΠΎ ΠΌΠΎΠΆΠ΅Ρ ΠΎΡΠ»ΠΈΡΠ°ΡΡΡΡ)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Π‘ΡΡΠΎΠΊΠ° ΡΠΎ ΡΠ»ΠΎΠ²Π°ΠΌΠΈ. ΠΡΠ²Π΅ΡΡΠΈ ΠΌΠ°ΡΡΠΈΠ² ΡΠΎ ΡΠ»ΠΎΠ²Π°ΠΌΠΈ Ρ Π±ΠΎΠ»ΡΡΠΎΠΉ Π±ΡΠΊΠ²Ρ + ΡΡΡΠΎΠΊΡ Ρ ΠΏΠ΅ΡΠ²ΡΠΌΠΈ Π±ΡΠΊΠ²Π°ΠΌΠΈ ΡΡΠΈΡ
ΡΠ»ΠΎΠ²
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Last updated
Was this helpful?