Get Date After x Days
Given an
index.js
file parallel to README.md
file.Write a JS function that accepts
days
as an argument and return the date after given number of days
from 22nd Aug 2020 using the date-fns
package.Export the function using the default export syntax.
Date FormatDD-MM-YYYY
Use Common JS module syntaxGreeting Message
Create a new file
index.js
in the message directory.Write a JS program to export the string
Hello Rahul! Have a Great Day
using the message from greeting/index.js
.Export the template string using the default export syntax.
Use Common JS module syntaxFirst Names of the People
Create a file
index.js
in the names directory.Write a JS function in
index.js
with function name getPeopleInCity
that accepts people names list and returns an array of containing the first names of the people.Export the function using the default export syntax.
Folder StructureUse the given modules.
Use Common JS module syntaxCalculate Ratio and Factorial
Create a file
index.js
in the ratioFactorial directory.Write a JS function in
index.js
that accepts 3 numbers as arguments and return the ratio of the first two numbers and factorial of the third number in an object with keys as ratio
and factorial
.Export the function using default export syntax.
Folder StructureUse the functions provided in the ratio and factorial directories.
Use Common JS module syntax