All Questions
20 questions
1
vote
1
answer
228
views
JavaScript function that generates Fibonacci like sequences of given order
Generalizations of Fibonacci numbers
Fibonacci numbers of higher order
A Fibonacci sequence of order \$n\$ is an integer sequence in which each
sequence element is the sum of the previous \$n\$
...
3
votes
1
answer
158
views
A simple JavaScript function that does prime factorization
This is a simple JavaScript function that does prime factorization.
I wrote it on an Android phone with online editor (I don't have access to computers in night time):
Code:
...
2
votes
2
answers
1k
views
FizzBuzz in JavaScript (node.js), my first JavaScript program
I had just decided to learn JavaScript, so I wrote this program. I am sure you know what FizzBuzz is so I wouldn't describe it here.
Console output:
...
3
votes
1
answer
469
views
arithmetic with numbers and letters
I've started learning JavaScript last week. Today I ran into a JS exercise available at this link
codewars exercise and decided to give it a try. I've used very basic JS because I know only a small ...
3
votes
1
answer
2k
views
Codewars: Sum Strings
Sum Strings
Codewars kata.
It's supposed to be able to handle big integers.
Question
Given the string representations of two integers, return the string representation of the sum of those integers.
...
2
votes
1
answer
1k
views
Codewars: Pick peaks
Pick peaks
Wrote my "hello world" on Thursday, so definitely a beginner. I know some Python, so not a novice to programming in general.
Question
For example, the array ...
1
vote
1
answer
2k
views
Codewars: Reverse or Rotate
CodeWars 6 Kyu: Reverse or rotate?
I wrote my Javascript "hello world" on Thursday, so I'm definitely a JS beginner. I do have some experience in Python though, so I'm not a complete novice to ...
4
votes
4
answers
297
views
Largest Palindrome Product - Project Euler #4
This is my code for Project Euler Problem #4
The question:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find ...
0
votes
1
answer
137
views
A faster way to compute largest prime factor (Again, but a lot better)
I came up with this code after implementing the feedback given by @200_success. The previous one (A faster way to compute the largest prime factor) tested my patience, but still failed to give the ...
5
votes
1
answer
206
views
Create a town administration report
I am Learning Javascript, after doing Java development for 2 years. I am doing a module on udemy which had a coding challenge which I completed and it works but wanted to get it reviewed to find out ...
0
votes
2
answers
9k
views
Input string, output vowels and consonants to log, separately but in order
I completed a short coding challenge and just want to know if I should use shorter methods of which I am unaware, or make it more readable.
...
6
votes
2
answers
5k
views
Partitioning input strings by even and odd indexes
I have been trying to learn javascript for a year now, and have just embarked on HackerRank's 30 days of code. After a couple of days I finally solved this problem. Here is the task (if you click the ...
5
votes
3
answers
911
views
Letter Changes coderbyte
I've solved the problem below just would like some feedback?
The function LetterChanges(str) takes a str parameter
Replace every letter in the string with ...
4
votes
2
answers
3k
views
CodeWars: Gap in Primes
I wrote JavaScript code for finding the first two consecutive prime numbers (that doesn't have divisors except one and itself) with a specific gap between them. It works well but take too much time to ...
1
vote
1
answer
292
views
Codewars Challenge Kata
I was recently doing a challenge on Codewars and this is what challenge said:
There are no explanations. You have to create the code that gives the
following results:
...