Skip to content

AmramAnanyan/function

Repository files navigation

Function

Source map

  • Source
    • 1.script.js
    • 2.script2.js
    • 3.script3.js
    • 4.script4.js
    • 5.script5.js
    • 6.script6.js
    • 7.number.js
    • 8.largeNumber.js
    • 9.chars.js

  1. Given an array of numbers. Write a function to separate odd and even numbers in different arrays.

Decision


2.Write a function that calculates sum, difference, multiplication and division between given array elements depending on passed operation symbol. Write appropriate function for each operation.

Decision


  1. Given a phone number. Write a function to clean it up, so it is valid. The rules are as follows: If the phone number is less than 10 digits assume that it is a bad number If the phone number is longer than 10, then it is a bad number If the phone number is 10 digits assume that it is good If the phone number consists of 11 symbols and the first one is + and others are numbers, then trim + and return remaining 10 digits. If the phone number contains + symbol more than one, consider it as a bad number. If the phone number contains + symbol not as the first character, consider it as a badnumber.

Decision


4.Given a word and a list of possible anagrams, select the correct sublist.

Decision


  1. Write a function, which receives a string, finds possible largest numbers in the string and returns their sum.

Decision


6.Write a function which receives two strings and removes appearances of the second string from the first one.

Decision


7.Write a function to compute a new string from the given one by moving the first char to come after the next two chars, so "abc" yields "bca". Repeat this process for each subsequent group of 3 chars. Ignore any group of fewer than 3 chars at the end

Decision


  1. Write a function that accepts a string(a sentence) as a parameter and finds the longest word within the string. If there are several words which are the longest ones, print the last word(words can be separated by space, comma or hyphen)

Decision


9.Write a function which receives an array and a number as arguments and returns a new array from the elements of the given array which are larger than the given number.

Decision

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published