Skip to content

gajendra-ingle/30-Days-of-JavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 

Repository files navigation

30 Days of JavaScript Challenge 🎯

Welcome to the 30 Days of JavaScript Challenges! This repository contains a series of challenges designed to improve your JavaScript skills over the span of 30 days. Each day presents a new challenge to solve, ranging from basic concepts to more advanced techniques. Whether you're a beginner looking to sharpen your skills or an experienced developer seeking a refresher, these challenges will provide an engaging way to enhance your understanding of JavaScript.

Day Questions
01 Write a function that takes two numbers as arguments and returns their sum.
02 Write a function that takes a string as an argument and returns its length.
03 Write a program that takes two numbers and displays their sum, difference, product, and quotient.
04 Write a function that takes two numbers as arguments and returns the larger number.
05 Write a program that displays a string in reverse order.
06 Write a program that takes a number and checks whether it is positive, negative, or zero.
07 Write a program that takes a number and prints the multiplication table for that number.
08 Write a program that takes a number and calculates the sum of all numbers from 1 to that number.
09 Write a program that takes a string and prints out the number of vowels in the string.
10 Write a function that takes two arrays of integers as arguments and returns an array of the common elements in both arrays, without any duplicates. The returned array should be sorted in ascending order. For example, given the arrays [1, 2, 3, 4, 5] and [3, 4, 5, 6, 7], the function should return [3, 4, 5].
11 Write a function called 'greet' that takes a name parameter and logs a greeting message to the console.
12 Write a function called 'getSquare' that takes a number parameter and returns its square.
13 Write a function called 'countLetters' that takes a string parameter and returns an object that contains a count of each letter in the string.
14 Write a function called 'createCounter' that returns a function. The returned function should increment a counter variable each time it is called and return the current count.
15 Write a function called 'sumEvenNumbers' that takes an array of numbers as a parameter and returns the sum of all even numbers in the array.
16 Write a function that takes an array of numbers as an argument and returns the sum of all the numbers in the array.
17 Write a function that takes an array of strings as an argument and returns a new array with only the strings that have a length greater than 5.
18 Write a function that takes an object and returns an array of all the keys in the object.
19 Write a function that takes an array of objects and returns an array of all the values of a specified property name.
20 Write a function that takes an array of objects and returns the object with the highest value for a specified property name.
21 Write a function that returns a promise which resolves after a specified number of milliseconds.
22 Write a function that returns a promise which rejects with a specified error message after a specified number of milliseconds.
23 Write a function that returns a promise which resolves with an array of random numbers after a specified number of milliseconds.
24 Write a function that uses async/await to make an API call to fetch data and returns a promise with the response.
25 Write a function that uses async/await to make multiple API calls in parallel and returns a promise with an array of responses.
26 Write a function that throws an error if the parameter is not a number, and handles the error with a custom error message.
27 Write a try-catch block that catches any errors a function throws and logs them to the console with a custom error message.
28 Write a function that takes a string as input and returns true if the string contains only alphabets, and false otherwise.
29 Write a function that takes a string as input and returns true if the string contains at least one digit, false otherwise.
30 Write a function that takes a string as input and replaces all occurrences of "cat" with "dog".
31 Write a function that takes an array of numbers and uses the spread operator to find the maximum value.
32 Write a function that takes an object and uses destructuring to extract the values of its properties and return them as an array.
33 Write a function that takes a string and uses template literals to create a new string with the input string and a variable inserted into it.
34 Write a function to simulate an asynchronous delay using a callback.
35 Write a function that logs an error message to the console if a certain condition is not met.
36 Write a function to fetch data from an API using the Fetch API and handle the response with a callback.
37 Write a function that takes an array of strings and returns a new array with all the strings in uppercase.

Acknowledgements 📃

These challenges were inspired by various JavaScript resources and programming exercises. Special thanks to the developers and educators who have contributed to the JavaScript community.

About

30 days of JavaScript challenge.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published