Code Monkey home page Code Monkey logo

js's People

Contributors

aaronslawson avatar andrewmacmurray avatar bektaz avatar bradreeder avatar comountainclimber avatar coudrew avatar frameture avatar franzmoro avatar gabrielperales avatar jay-meister avatar juliankolbe avatar jwld avatar katbow avatar majakudlicka avatar mcelearr avatar msachi avatar nalinc avatar otajor avatar patrickwalkowicz avatar richawarren avatar scottdemeo avatar simoneferrero avatar stevehopkinson avatar tas12 avatar tdowek1 avatar thevjm avatar toast565 avatar troymaeder avatar tu6619 avatar webtechalex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

msachi leleluu

js's Issues

Review teamwork process to avoid conflicts and document in README

@JMurphyWeb, @Bektaz I've done some reasearch on GitHub workflows inspired by our recent conversation and this comment.

I've found a good article on GitHub Flow.

So after reading that, I have a few ideas.

  1. We could abandon working on our own forks and switch to working on codingforeveryone/js directly (as we all have rights to push changes - it's been probably setup this way by @Bektaz while creating the repo, is that correct?)
  2. For each new challenge, the author would create a new branch named after the function and create an issue describing the challenge.
  3. If any of us wants to take the challenge, we can reply to the issue so the rest of us won't try to push their solutions at the same time. So in a sense this person would 'reserve' a spot for solving the problem.
  4. When a solution is ready, the changes can be pushed to the branch named after the challenge and then, a pull request created (from that branch to master). So even if the solution isn't correct, it won't be pushed to master branch yet and can be corrected easily.
  5. If the person who created the challenge decides that the solution is correct, he/she can merge the pull request into the master.

Please let me know if that makes sense and if anything can be improved?

New-Member-#7

Function nthChar takes 1 parameter - an array of n words.

You must concatenate the nth letter from each word to construct a new word which should returned as a string.

Note: Test cases contain valid input only - i.e. a string array or an empty array.

function nthChar(words){
...
}

so nthChar(['yxx','xex','xxs']) should return 'yes'

This is one of my katas on Codewars called Substring Fun if you want to practice:

http://www.codewars.com/kata/565b112d09c1adfdd500019c

new-member-25 Between Extremes

Given an array of numbers, return the difference between the largest and smallest values.

For example:

[23, 3, 41, 21, 16] should return 20 (i.e., 23 - 3).

[1, 434, 555, 34, 112] should return 554 (i.e., 555 - 1).

The array will contain a minimum of two elements.

This is the link to Codewars.

New Member #4 - Factors

Finding factors of a positive number

Create a function that takes a number and finds the factors of it, listing them in descending order.

If the parameter is not an integer or is a negative integer, return -1

The returned factors should be in an array

Example:

factors(54) should return [54, 27, 18, 9, 6, 3, 2, 1]

Idea for beginners

I have an idea which is designed to assign anyone new to this repository a problem that they can then practice using the guide set out by @patrickwalkowicz in the README.

  • Each new member of the repo will always find an easy problem waiting for them.

  • Once they have reserved and then solved the problem, they must create a new easy problem, designated for the next new member to the repo.

  • To distinguish the "New Member" problem, it should be named new-member-1, new-member-2 ...

    This way there is always a simple JS problem to solve for any new member to this repository. Let me know your thoughts.

New Member-21 Deficiently Abundant Perfect Amicable Numbers

As we're a little light on problems at the moment, here's another from my vault:

For a given two numbers your mission is to derive a function that evaluates whether two given numbers are abundant, deficient or perfect and whether together they are amicable.

Abundant Numbers

An abundant number or excessive number is a number for which the sum of its proper divisors is greater than the number itself.

The integer 12 is the first abundant number. Its proper divisors are 1, 2, 3, 4 and 6 for a total of 16 (> 12).

Deficient Numbers

A deficient number is a number for which the sum of its proper divisors is less than the number itself (and for this case equal to).

The first few deficient numbers are: 1, 2, 3, 4, 5, 7, 8, 9.

Perfect Numbers

A perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself.

The first perfect number is 6, because 1, 2, and 3 are its proper positive divisors, and 1 + 2 + 3 = 6.

Amicable Numbers

Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. (A proper divisor of a number is a positive factor of that number other than the number itself. For example, the proper divisors of 6 are 1, 2, and 3.)

For example, the smallest pair of amicable numbers is (220, 284); for the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, of which the sum is 284; and the proper divisors of 284 are 1, 2, 4, 71 and 142, of which the sum is 220.

The Function

For a given two numbers, derive function deficientlyAbundantAmicableNumbers(num1, num2) which returns a string with first and second word either abundant or deficient depending on whether num1 or num2 are abundant, deficient or perfect. The string should finish with either amicable or not amicable depending on the relationship between num1 and num2.

e.g. deficientlyAbundantAmicableNumbers(220, 284) returns "abundant deficient amicable" as 220 is an abundant number, 284 is a deficient number and amicable because 220 and 284 are an amicable number pair.

On codewars -> Deficiently Abundant Perfect Amicable Numbers

new-member-16

Greatest Difference

You will be given an array of arrays. Each nested array will contain a set of increasing positive integers. Your function should return the value of the greatest difference between any two sequential numbers within the same array.

For example...

var sampleArr1 = [
                  [4, 7, 8, 15, 22, 33, 35, 41, 53],
                  [23, 44, 67, 68, 99, 102],
                  [199, 203, 205, 213, 218],
                  [10, 12, 77, 133, 150]
                ];

var sampleArr2 = [
                  [361, 403, 425, 480, 576, 672, 730, 733, 805, 826],
                  [896, 982],
                  [303, 399, 489, 490, 499, 515, 578],
                  [553, 555, 646, 692, 697],
                  [272, 338, 353, 432, 529, 553, 565]
                ];

greatestDiff(sampleArr1); // Returns 65
greatestDiff(sampleArr2; // Returns 97

New member 26 Spoonerisms

A spoonerism is a spoken phrase in which the first letters of two of the words are swapped around, often with amusing results.

This issue is taken from my very first Codewars Kata

In its most basic form a spoonerism is a two word phrase in which only the first letters of each word are swapped:

"not picking" --> "pot nicking"

Your task is to create a function that takes a string of only two words, separated by a space and returns a spoonerism of those words in a string, as in the above example.

NOTE: Spoonerisms can be more complex. For example, three-word phrases in which the first letters of the first and last words are swapped: "pack of lies" --> "lack of pies" or more than one letter from a word is swapped: "flat battery --> "bat flattery" You are NOT expected to account for these, or any other linguistic nuances involved in spoonerisms.

Additions to CONTRIBUTING.md

These are suggestions for improvements and clarifications to CONTRIBUTING.md.

Suggestion by @tas12 - For step 1: I think when a new member needs to open an issue to request a problem you could include that bit about what they should name the issue (before it was "New member in need of a problem"). Then it's easier to identify issues that are new problem requests.

Suggestion by @andrewMacmurray - Maybe add something here like "Join our chat room on gitter, we'd love to hear from you!", just to make it very clear this is a friendly and sociable repo. This could also go at the top of the README.md by the gitter channel button!

Suggestion by @tu6619 - What about adding something to the line "Keep the problem simple!"? Maybe something like "Have a look at 8kyu and 7kyu Katas on Codewars for inspiration!".

New member #5 - Article Archive

You are a first-time online publisher and would like to post your articles online. You want to build an archive which can store and update article information and enables "likes" from social networks.

The "archive" array will store an object for each article. Each object shall contain the following article info:

  • "articleId" - each article has its id. The 1st article has id 1, the 2nd id 2 and so on. The value must be an integer.
  • "title" - any string value.
  • "filename" - this value will store the filename where the article is stored, for example, 'path.txt'. The file should always have the ".txt" extension. The filename will use the provided article "title" (previous field). Blank spaces in the title shall be replaced with "_", while the following characters shall be discarded in the filename: (){}[]/.,;!?`+@%^#$拢
  • "likes" - shows how many people have liked the article on each of the social networks in the "networks" array.

Please use the provided names for each info-field.

You should write the following functions:

  • "article" - a constructor which takes the "title" argument to create an article object with the above listed info, and add it to the archive. For example:
new article("Something, Something!");
//would return:
{
  articleId: 1,
  title:"Something, Something!",
  filename: "Something_Something.txt",
  likes: {facebook:0,twitter:0,googlePlus:0}
  }
  • "like" - a function which takes the "title" and "network" arguments, and "+1"s the total social-netowork likes of that article. For example:
like("Something, Something!","twitter");
//would return:
{facebook:0,twitter:1,googlePlus:0}
  • "remove" - a method which takes the "title" argument and removes the the article with such title from the archive. The other articles' id's will be updated accordingly. For example, let's say we added a 2nd article named "Fancy new article" to our archive, and decided later to remove the previous article:
remove("Something!, Something!");
//would return:
[{
  articleId: 1,
  title:"Fancy new article",
  filename: "Fancy_new_article.txt",
  likes: {facebook:0,twitter:0,googlePlus:0}
  }]

Collaboration on checklist project

Thanks for today's hangout! For those who couldn't make it, we've decided to collaborate on manageable projects to practice with. The first one we chose is building a front of a checklist application. So this would require HTML + CSS + JavaScript/jQuery.

What I think the application should be able to do:

  • Add checklist items typed by user to the "To Do" list
  • Move checked items to "Completed" list (or delete them altogether after checking them off "To Do" list)

@MyPitit, @FrancescoPalma, @daymos, @thevalent, @Bektaz, @JMurphyWeb, what do you think?

vector binary search using recursion

Problem: find if an element x is present in a vector using binary search principle. The function must be written using recursion.

I think this is a classic problem, so if you look around you will find the solution already made. So I try to give here the basic explanation to solve it without having to look around too much. Probably you know already this topic, but I麓ll write a couple of lines anyway.

Binary search is efficient, because it never uses more the log_2(N) attempt to find an element in a vector of N elements.

You need the data to be ordered. You cannot assume the data will be ordered. You can assume it will be an array of integers.

The principle is that you divide the data in 2 parts, and check if the number you are searching for, is bigger or smaller then the value you have on the division. If not you repeat with one of the 2 subset of data and go on until you find the value.

New-member-15 Group In 10s

Write a function groupIn10s which takes any number of arguments, and groups them into sets of 10s and sorts each group in ascending order.

The return value should be an array of arrays, so that numbers between 0-9 inclusive are in position 0 and numbers 10-19 are in position 1, etc.

Here's an example of the required output:

const grouped = groupIn10s(8, 12, 38, 3, 17, 19, 25, 35, 50) 

grouped[0]     // [3, 8]
grouped[1]     // [12, 17, 19]
grouped[2]     // [25]
grouped[3]     // [35, 38]
grouped[4]     // undefined
grouped[5]     // [50]

The kata is also on CodeWars

new-member-9

Monoalphabetic substitution cipher

Write a function subCipher that takes a string and replaces each letter with the next letter in the alphabet. Letters in the encoded string should be in uppercase.

Example:

subCipher("welcome to the group!");  //returns "XFMDPNF UP UIF HSPVQ!"

Repl.it is a good place to try out your code.

New Member #3 - alternating string

This is a simple problem for new members to get used to working with github:

Have a look through the readme before completing it

Write a function that takes a size and returns a string of alternating '1s' and '0s'.

the string should start with a 1.

a string with size 6 should return : '101010'

with size 4 should return : '1010'

with size 12 should return : '101010101010'

The size will take positive whole numbers.

Tube strike options calculator

Tube strike options calculator

The sweaty bus ride

There is a tube strike today so instead of getting the London Underground home you have decided to take the bus. It's a hot day and you have been sitting on the bus for over an hour, but the bus is hardly moving. Your arm is sticking to the window and sweat drips off your nose as you try to read your neighbour's book when you say to yourself, "This is ridiculous. I could have walked faster than this!" Suddenly you have an idea for an app that helps people decide whether to walk or take the bus home when the London Underground is on strike.

You rush home (relatively speaking) and begin to define the function that will underpin your app.

Function specification

You must create a function which takes three parameters; walking distance home, distance the bus must travel, and the combined distance of walking from the office to the bus stop and from the bus stop to your house. All distances are in kilometres.

So for example, if your home is 5km away by foot, and the bus that takes you home travels 6km, but you have to walk 500 metres to the bus stop to catch it and 500 metres to your house once the bus arrives (i.e. 1km in total), which is faster, walking or taking the bus?

Walking speed and bus driving speed have been given to you as two pre-loaded constants.

walk = 5 (km/hr)
bus = 8 (km/hr)

The function must return the fastest option, either "Walk" or "Bus". If the walk is going to be over 2 hours, the function should recommend that you take the bus. If the walk is going to be under 10 minutes, the function should recommend that you walk.

http://www.codewars.com/kata/tube-strike-options-calculator/javascript

Write function revertString

Revert String

I've got a string manipulation problem to solve for you.

Write a function that will revert a word but preserve the original lowercase/uppercase letter order. It's easiest to explain with examples:

  • If you pass "JavaScript", the function should return "TpirCsavaj"
  • If you pass "RaNdom", the function should return "MoDnar"
    As you can see looking at the output, the string itself is reverted but the order of capital letters is preserved - just the same as in the input string (in "RaNdom" the first and third letter is capital in both input and output).

Input restrictions:

  • You can assume that only one word will be passed as input
  • Input of type string, only alphabetical characters

My idea is to start with simple one-word input and improve as we go - eventually getting to multiple words and characters other than alphabetical.

Project Euler 1

Slightly adapted the first problem from project euler:
https://projecteuler.net/problem=1

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Create a function that will find the sum of all the multiples of 3 or 5 below an integer x

function sumOfMultiples(x){
//
}

New-member-16 Multi-criteria filter

You must to choose one:

  • Approach one (the easy one):
    Write a function called multiFilter which receives two arrays as parameters. The first one is the collection to be filtered and the second one is an array of functions. The function should return all elements which pass all filter functions.

That is, if we have two functions:

function isEven(el){
  return el % 2 === 0;
}

and

function isGTten(el){
  return el > 10;
}

then

multiFilter([1,2,3,4,10,11,12,20,21,22], [isEven, isGTten]) // returns [12,20,22]
  • Approach two:
    Write a function called multiFilter which receives one array of filter functions. The function should return a function that receives one element (a compound filter function).

That is, if we have two functions:

function isEven(el){
  return el % 2 === 0;
}

and

function isGTten(el){
  return el > 10;
}

then

[1,2,3,4,10,11,12,20,21,22].filter(multiFilter([isEven, isGTten])) // returns [12,20,22]

New member #6 - Count strings inside an object

Create a function strCount (takes an object as argument) that will count all string values inside an object. For example:

strCount({
  first: "1",
  second: "2",
  third: false,
  fourth: ["anytime",2,3,4],
  fifth:  null
  })
  //returns 3

New-Member-13 The Christmas List

New-Member-13-The Christmas List

Santa has just finished the Christmas delivery but it's the time he dreads, when he starts getting letters from upset children stating they have been given the wrong presents.

We all know Santa checks his list twice but he also checks a third time after delivery

Help Santa to make sure that all the presents were delivered correctly by writing a function that takes two objects and compares whether they are the same

christmasMasterList2015 = {
Johnny: "coal",
Petey: "Monster Truck",
Tommy: "Iphone 6 plus with unlimited 4g contract"
}

presentsDelivered2015 = { 

Johnny: "coal",
Petey: "Monster Truck",
Tommy: "Iphone 6 plus with unlimited 4g contract"

}

presentsDelivered2014 = {
Johnny: "coal",
Petey: "Tricycle",
Tommy: "Marvel Unlimited Subscription"
}

Example

allPresentsDelvieredCorrectly(christmasMasterList2015, presentsDelivered2015)
//returns true
allPresentsDelvieredCorrectly(christmasMasterList2015, presentsDelivered2014)
//returns false

new-member-27 Paperboy

You and your best friend Stripes have just landed your first high school jobs! You'll be delivering newspapers to your neighbourhood on weekends. For your services you'll be charging a set price depending on the quantity of the newspaper bundles.

The cost of deliveries is:

  • $3.85 for 40 newspapers
  • $1.93 for 20
  • $0.97 for 10
  • $0.49 for 5
  • $0.10 for 1

Stripes is taking care of the footwork doing door-to-door drops and your job is to take care of the finances. What you'll be doing is providing the cheapest possible quotes for your services.

Write a function that's passed an integer representing the amount of newspapers and returns the cheapest price. The returned number must be rounded to two decimal places.

Paperboy

Add readme and description to this repo

Hi @Bektaz,

You created this js repo in the codingforeveryone organisation rather than on your personal account which we take to mean that this is a resource for the whole community to benefit from 馃帀 馃憦

Could you please add both a description and a readme to the repo so that everyone may understand what the repo is about and how it should be used?

Thank you again for taking part in the codingforeveryone community !

Edit function revertString so that it handles string of any length

I suggest improving upon the provious version of revertString function. For reference, you can find specification of the original here.

Input

String of any length, only alphabetical characters and spaces

Output

String of reverted input, preserving the original order of capital letters and order of words.
Example:
Input: "Hello WorLD"
Output: "Olleh DlrOW"

What to do

Please modify the existing code so that it handles input like specified above and submit a pull request when ready.

New-Member-#8

Write a function that removes all the even characters from a string and returns them in an array. If the string is smaller than two characters and longer than 100 characters, the function should return "invalid string".

For example:

function evenChars("abcdefghijklm") {}
// should return ["b", "d", "f", "h", "j", "l"]

function evenChars("a")
// should return "invalid string"

I've posted this problem as a Codewars Kata if you want to practice!

Check proper functionality of code

There is a javascript file getNumberLength.js. The functionality of code needs to be checked with different kinds of inputs. For example the function gives wrong result when input is very large number with 30 zeroes.

New Member-24 Take a ten minute walk!

One of my favorites on Codewars!

Take a ten minute walk

You live in the city of Cartesia where all roads are laid out in a perfect grid. You arrived ten minutes too early to an appointment, so you decided to take the opportunity to go for a short walk. The city provides its citizens with a Walk Generating App on their phones -- everytime you press the button it sends you an array of one-letter strings representing directions to walk (eg. ['n', 's', 'w', 'e']).

You know it takes you one minute to traverse one city block, so create a function that will return true if the walk the app gives you will take you exactly ten minutes (you don't want to be early or late!) and will, of course, return you to your starting point. Return false otherwise.

Note: you will always receive a valid array containing a random assortment of direction letters ('n', 's', 'e', or 'w' only). It will never give you an empty array (that's not a walk, that's standing still!).

On Codewars

New Member-19 Self Descriptive Numbers!

A number is self-descriptive when the n'th digit describes the amount n appears in the number.

E.g. 21200:

There are two 0's in the number, so the first digit is 2.

There is one 1 in the number, so the second digit is 1.

There are two 2's in the number, so the third digit is 2.

There are no 3's in the number, so the fourth digit is 0.

There are no 4's in the number, so the fifth digit is 0

Numbers can be of any length up to 9 digits and are only full integers. For a given number derive a function selfDescriptive(num) that returns; true if the number is self-descriptive or false if the number is not.

The kata on codewars

New Member #1 - sumCircles

Write a function that takes as its parameters some numbers representing the diameters of circles.

It should return the sum of the areas of all these circles, rounded to the nearest integer, as a string: "We have this much circle: xyz".

You don't know how many circles there will be, but you can assume there will be at least one.

function sumCircles(){
// codecodecode
}

sumCircles(2) // returns "We have this much circle: 3"
sumCircles(2, 3, 4)// returns "We have this much circle: 23"

readMe update

The readme for the repo could do with some more explanation for total beginners with GitHub. No extensive guide but maybe a basic Do's and Dont's?
Also your Gitter message containing useful GitHub links will be useful to all newcomers:
Here's a good read on Git: https://github.com/NataliaLKB/learn-git-basics
And nice tutorial on resolving conflicts when merging http://www.gitguys.com/topics/merging-with-a-conflict-conflicts-and-resolutions/ (something you'll have to do when trying to synchronise thevalent/js to be up to date with codingforeveryone/js).

New-member-20 2d Vector Translation on an (in)Finite Plane

Create a function that returns the sum of 2 vectors BUT the returned vector must be within the bounds of a 10*10 area. Results outside the bounds should "wrap around" to stay inside. For example:
translate2D([5,7],[2,-1]) //should return [7,6]
translate2D([8,9],[3,5]) //should return [1,4]

New Member #2 - splitTheBill

Write a function to work out who is owed what when a group of friends all pay different amounts toward a bill.

  • The function should take one parameter: an object with two or more name-value pairs which represent the members of the group and the amount spent by each.
  • The function should return an object with the same names, showing how much money the members should pay or receive.

Further points:

  • The values should be positive numbers if the person should receive money from the group, negative numbers if they owe money to the group.
  • If value is a decimal, round to two decimal places.

Example

3 friends go out together: A pays 拢20, B pays 拢15, and C pays 拢10 toward the bill. The function should return an object showing that A should receive 拢5, B should receive 拢0, and C should pay 拢5.

var group = {
    A: 20, 
    B: 15, 
    C: 10
}

splitTheBill(group) // returns {A: 5, B: 0, C: -5}

New-member-14 remove noise from the message

We have a broken message machine that introduces noise to our incoming messages. We know that our messages are written using a-zA-Z and white characters (like spaces or tabs). Unfortunately our machine introduces noise, which means that our message arrives with characters like: %$&/#路@|潞\陋 within our original message.

Your mission is to write a function which removes this noise from the message, but there is bad news, the computer designated to host our program has some limitations and we can't use loops in our scripts (that is, we can't use for, while and forEach loops), instead, we should use regular expressions, map, reduce or/and replace.

Example:

removeNoise("h%e&路%$路llo w&%or&$l路$%d")
// returns hello world

removeNoise("he%$路ll@o c$&%odi%&ng for ev|#路ery&$$#$on%$路e")
// returns hello conding for everyone

new-member-10

Given an array containing random occurrences of zeros and ones, write a function countOnes(arr) that returns the counts of the sequential ones in the array.

For example:

countOnes([0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1]) // returns [2, 4, 2]

We Have Liftoff!

You have an array of numbers 1 through 10 (JS: 1 through 10 or less). The array needs to be formatted correctly for the person reading the countdown of a spaceship launch.

Unfortunately, the person reading the countdown only knows how to read strings. After the array is sorted correctly make sure it's in a format he can understand.

Between each number should be a space and after the final number (1) should be the word 'liftoff!'

Example:
[8,1,10,2,7,9,6,3,4,5]
Should return
"10 9 8 7 6 5 4 3 2 1 liftoff!"

[1,2,4,3,5]
Should return
"5 4 3 2 1 liftoff!"

**Note I am not the original author of this exercise http://www.codewars.com/users/SpencerCDixon

New exercise: findSum function

create a function findSum() which can be used in the following way:
var plus2 = findSum(2);
plus2(5); => 7
OR
findSum(4)(6); => 10

New member 18 Quartile Methods

Create a new object called Stats that has three methods:

  • Stats.median
  • Stats.lowerQuartile
  • Stats.upperQuartile

median should return the number at the midpoint in a sorted array. lowerQuartile should return the number one quarter of the way through the array. upperQuartile should return the number three quarters of the way through the array. When a cut-off point is between two numbers, take the average of the numbers on either side. Round your answer to a maximum of two decimal places.

All inputs will be valid arrays of numbers.

Here is the kata on codewars http://www.codewars.com/kata/quartile-methods

new-member-23 move Vowels

Given a string as input, move all of its vowel to the end of the string.

Example input: day
Example output: dya

Example input: apple
Example output: pplae

Note: All input string are of small capital letters, and the order of the vowels at the end should be the same as they were before.

Here's the link to the kata on codewars: http://www.codewars.com/kata/56bf3287b5106eb10f000899

Write getNumberLength function

Write a function in getNumberLength.js file which helps to correctly define the length of given number. Further details in getNumberLength/README.md file.

New-member-12

Write a function that checks whether all elements in an array are square numbers. The function should be able to take any number of array elements.

Your function should return true if all elements in the array are square numbers and false if not.

An empty array should return undefined.

Examples:
isSquare([1, 4, 9, 16]);
//returns true

isSquare([3, 4, 7, 9]);
//returns false

isSquare([]);
//returns undefined

Improve revertString stylistically

@thevalent , @JMurphyWeb as I've mentioned in Gitter chat, I've decided to merge the pull request that was sent earlier. Thanks again for working on this one, guys!

I came up with another Git/JS exercise that presented itself along the way. The current revertString is working but I think it could use some tweaking style-wise (like fixing indentation so it's obvious which blocks belong to what functions, fixing spacing around operators, cutting down some line breaks etc). Please treat is as an exercise in fixing code (rather than writing functions from scratch). If you're interested, feel free to contribute.

See you around!

new-membder-10+1

Given a string, write a function that returns the sum of all the digits in the string.

e.g. sumDigits("33 little frogs eat 44 squirrels every 2 days, ew") -> 16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 馃搳馃搱馃帀

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.