# 50 micro coding challenges for JavaScript learners

###
Adrian
*Updated on *
・4 min read

This is a list of 50 micro coding challenges intended for beginners that just learned the basis of JavaScript language. Solve them to improve or test your coding skills and language understanding.

Although the challenges are designed for codeguppy.com learners, the challenges are platform agnostic so any JavaScript beginner can have fun with them.

### What coding environment to use?

We recommend using an online JavaScript coding environment that allows you to share your code with others if you decide so. codeguppy.com is one option, but any other online JavaScript playground will work just fine.

### Coding challenges

Print numbers from 1 to 10. Note: If you are using codeguppy.com, use can use the the println() function to print directly on the screen, otherwise use console.log() to output in the browser console.

Print the odd numbers less than 100

Print the multiplication table with 7

Print all the multiplication tables with numbers from 1 to 10

Calculate the sum of numbers from 1 to 10

Calculate 10!

Calculate the sum of even numbers greater than 10 and less than 30

Calculate the sum of numbers in an array of numbers

Calculate the average of the numbers in an array of numbers

Create a function that receives an array of numbers as argument and returns an array containing only the positive numbers

Find the maximum number in an array of numbers

Print the first 10 Fibonacci numbers without recursion

Create a function that will find the nth Fibonacci number using recursion

Create a function that will return a boolean specifying if a number is prime

Calculate the sum of digits of a positive integer number

Print the first 100 prime numbers

Create a function that will return in an array the first “p” prime numbers greater than “n”

Rotate an array to the left 1 position

Rotate an array to the right 1 position

Create a function to reverse an array and return the result as a new array

Create a function that will merge two arrays and return the result as a new array

Create a function that will receive two arrays of numbers as arguments and return an array composed of all the numbers that are either in the first array or second array but not in both

Create a function that will receive two arrays and will return an array with elements that are in the first array but not in the second

Create a function that will receive an array of numbers as argument and will return a new array with distinct elements

Calculate the sum of first 100 prime numbers and return them in an array

Print the distance between the first 100 prime numbers

Create a function that will add two positive numbers of indefinite size. The numbers are received as strings and the result should be also provided as string.

Create a function that will return the number of words in a text

Create a function that will capitalize the first letter of each word in a text

Calculate the sum of numbers received in a comma delimited string

Create a function that returns the number of occurrences of each word inside a text. The return will be an array with objects inside {word, count}

Create a function to convert a CSV text to a “bi-dimensional” array

Create a function that converts a string to an array of characters

Create a function that will convert a string in an array containing the ASCII codes of each character

Create a function that will convert an array containing ASCII codes in a string

Implement the Caesar cypher as a single function encryptDecrypt(text, key);

Implement the bubble sort algorithm for an array of numbers

Create a function to calculate the distance between two points defined by their x, y coordinates

Create a function that will return a Boolean value indicating if two circles defined by center coordinates and radius are intersecting

Create a function that will receive a bi-dimensional array as argument and a number and will extract as a uni-dimensional array the column specified by the number

Create a function that will convert a string containing a binary number into a number

Create a function to calculate the sum of all the numbers in a jagged array (contains numbers or other arrays of numbers on an unlimited number of levels)

Find the maximum number in a jagged array of numbers or array of numbers

Deep copy a jagged array with numbers or other arrays in a new array

Create a function to return the longest word in a string

Shuffle an array of strings

Create a function that will receive n as argument and return an array of n random numbers from 1 to n. The numbers should be unique inside the array.

Find the frequency of letters inside a string. Return the result as an array of arrays. Each subarray has 2 elements: letter and number of occurrences.

Calculate Fibonacci(500) with high precision (all digits)

Calculate 70! with high precision (all digits)

Have fun… and don’t forget to share your solutions or comment about your progress. If you are a Twitter user, you can also tweet about your progress with hashtag #codeguppychallenge