Skip to content

Instantly share code, notes, and snippets.

@jsohndata
Last active March 24, 2023 20:36
Show Gist options
  • Save jsohndata/d8d4b959be9214ef70275499f7e458c9 to your computer and use it in GitHub Desktop.
Save jsohndata/d8d4b959be9214ef70275499f7e458c9 to your computer and use it in GitHub Desktop.
Week 1 Group Project

Week 1 Group Project

1) convertTempature

Create a function that can converts fahrenheit to celcius.

Sample output will says

"Today is 80F (26.7C)." 

This should work given any number.

2) convertCurrency

Write a function that convert Japanese Yen to Dollars.

The output should say

"100 Yen is 0.77 US Dollars". 

This should work given any number.


3) getLargestNumber

Given the array of numbers, write funtion returning largest number in array.

const largestInt = [2,5,7,1337,13,21,22,55,66,13,14551,41];

4) sumTotal

Calculate the sum of all the numbers in the following array

const sumInt = [6,1,643,234,123,4,7,9];


5) countOddNumber

Given any array of numbers (all will be > 0), write a function that returns the number of odd numbers in the array.

const countNumber = [1,3,7,6,13,20,2,5,33,9,14];


6) isPalinadrome

Check if a string is a palinadrome.
Challenge: Check each value of an Array if it's a palindrome

const words = ["Wow","RACEcar","cvdewe3q","dEed","nOoN","stuff","LEvEL","Paladin","RaDaR","famous","Taxi"];

7) isPalinadrome

Check if a string is a palinadrome.

A) isTrueOrFalse

Create a function which returns the number of true values in an array.

const testArray1 = [ true, false, false, true, false, false, false, true, true, true, false, ]

Challenge:

const testArray2 = [ true, false, false, true, null, false, 0, 1, "false"]

B) countDown

Create a function that count downs from 20 to 1, then on the number 0 say "blast off".

Sample: 
5
4
3
2
1
blast off 🚀

Challenge:

Sample: 
5 ***** 
4 ****
3 ***
2 **
1 *
Blast off 🚀
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment