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.

  • 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?