Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SOliv1/39beff2968af02c1a2434f2274490ed4 to your computer and use it in GitHub Desktop.
Save SOliv1/39beff2968af02c1a2434f2274490ed4 to your computer and use it in GitHub Desktop.
Java Script Excercises in CodeAcadamy in association with Career Switch
@SOliv1
Copy link
Author

SOliv1 commented Oct 29, 2021

Calculate earth weight of the following planets:

Calculate the weight of the planets

Though an object’s mass remains consistent throughout the universe, weight is determined by the force of gravity on an object. Since different planets have different gravity, the same object would weigh different amounts on each of those planets! Cool, huh?

@SOliv1
Copy link
Author

SOliv1 commented Oct 29, 2021

Truthy or Falsy

Truthy or Falsy see gist here

See Code Academy Forums my comments in Code Academy Forums

@SOliv1
Copy link
Author

SOliv1 commented Nov 1, 2021

How Old

based on the newDate concept

Code Academy

@SOliv1
Copy link
Author

SOliv1 commented Nov 1, 2021

Fix the broken code

fix the broken code

@SOliv1
Copy link
Author

SOliv1 commented Nov 1, 2021

Tip Calculator

tipCalculator

@SOliv1
Copy link
Author

SOliv1 commented Nov 1, 2021

toEmoticon

toEmoticon

@SOliv1
Copy link
Author

SOliv1 commented Nov 1, 2021

Life Phase

lifePhase

@SOliv1
Copy link
Author

SOliv1 commented Nov 4, 2021

Secret Message

secret message

@SOliv1
Copy link
Author

SOliv1 commented Nov 4, 2021

Whale Speak - Loops

Whale Speak

Once we have converted text to the whale language, the result is sung slowly, as is a custom in the ocean.

To accomplish this translation, we can use our knowledge of loops. Let’s get started!

@SOliv1
Copy link
Author

SOliv1 commented Nov 4, 2021

Meal Maker

meal maker

In this project we use JavaScript to randomly create a three-course meal based on what is available on a menu. We’ll keep running it until we’re satisfied with the generated meal!

@SOliv1
Copy link
Author

SOliv1 commented Nov 4, 2021

meal maker

Meal Maker - Using javascript

We use JavaScript to randomly create a three-course meal based on what is available on a menu. We’ll keep running it until we’re satisfied with the generated meal!

@SOliv1
Copy link
Author

SOliv1 commented Nov 4, 2021

Team Stats

team stats

We create and extract information about our favorite sports team. Basketball, soccer, tennis, or water polo, we pick it. It’s our job to create data using the JavaScript data structures at our disposal: arrays, objects, etc.

Once created, we can manipulate these data structures as well as gain insights from them. For example, we might want to get the total number of games our team has played, or the average score of all of their games.

@SOliv1
Copy link
Author

SOliv1 commented Nov 5, 2021

Greet Aliens

Greet Aliens code

###Using decrement and increment
What does i++ and i-- mean?
decrement and increment

@SOliv1
Copy link
Author

SOliv1 commented Nov 5, 2021

Convert To Baby

Convert to Baby Code

Using decrement and increment

What does i++ and i-- mean?
decrement and increment

@SOliv1
Copy link
Author

SOliv1 commented Nov 5, 2021

Fix the broken code

Fix the Broken Code

In the above exercise the there was a scope error. Please read this excellent explanation relating to the exercise on Code Academy Forum
Also checkout What is Scope
[ ] smallestPowerOfTwo() function was not working to get the desired results, because we needed to add a new variable (J) to return the desired results of the smallest number two which is greater than the current element before using .push() to add it to results.

@SOliv1
Copy link
Author

SOliv1 commented Nov 8, 2021

Sort Years

sort years

sortYears() - takes in an array of years, and, uses the built-in .sort() method, returns that array with the years sorted in descending order.

We test our function when ready by passing in the years array or by making our own array of years!

@SOliv1
Copy link
Author

SOliv1 commented Nov 8, 2021

Just Cool Stuff

just cool stuff

just Cool Stuff - takes in two arrays of strings, and, uses the built-in .filter() method, returns an array with the items that are present in both arrays.

@SOliv1
Copy link
Author

SOliv1 commented Nov 9, 2021

Is the Dinner vegan

is dinner vegan

true or false

@SOliv1
Copy link
Author

SOliv1 commented Nov 9, 2021

Number Of Teeth

This exercise sorts the average number of teeth that species possesses (numTeeth) .

Number of Teeth

@SOliv1
Copy link
Author

SOliv1 commented Nov 11, 2021

Find My Keys

findMYKeys

Here is an array of strings which may or may not contain 'keys'. If the keys are in the array, our function should return the index at which they can be found. If they’re not in the array, our function should return -1.

@SOliv1
Copy link
Author

SOliv1 commented Nov 11, 2021

Dog Factory

dogFactory

Code Acadamy Forum Question:
Why are getters and setters important?
Answer
Getters and setters are important to use when we want to perform some operation on data before we view or save said data. Getters and setters are also important to use when we want to make sure we don’t override data unintentionally, by making that data accessible only through our getters and setters

@SOliv1
Copy link
Author

SOliv1 commented Nov 16, 2021

Lodash Library

# JAVASCRIPT SYNTAX, PART II

Lodash

@SOliv1
Copy link
Author

SOliv1 commented Nov 17, 2021

Credit Card Checker

Checks whether credit cards are valid or not.

Credit Card Checker

Screenshot (569)
)

credit card number generator

@SOliv1
Copy link
Author

SOliv1 commented Nov 21, 2021

#JavaScript Project

Mysterious Organism

Finally got this right - an interesting challenge!

@SOliv1
Copy link
Author

SOliv1 commented Nov 26, 2021

Message Mixer

Screenshot (578)
My code solution

Message Mixer

@SOliv1
Copy link
Author

SOliv1 commented Dec 1, 2021

Work Around Explorer

WorkAroundExplorer

What is it about

WorkAround is a research organization providing data on salary trends in the tech industry. Open up salaryData.js to see the data they have collected. You’ll notice that they have also created a few functions for filtering that data to get subsets of data by role and by company.

WorkAround wants to release a new web application called WorkAround Explorer to make their data more easily viewable.
This web app should allow users to choose specific roles and companies in the tech industry to see the following information:

  1. The salary for the chosen role at the chosen company.
  2. The industry average for the chosen role.
  3. The average salary at the chosen company across all roles.
  4. The industry average salary across all roles and all companies.

@SOliv1
Copy link
Author

SOliv1 commented Dec 15, 2021

Find My Hat

findhat.js

@SOliv1
Copy link
Author

SOliv1 commented Dec 17, 2021

##User Input Output Number Guess Game
inputOutput

@SOliv1
Copy link
Author

SOliv1 commented Dec 18, 2021

Create my own port with node

createport

@SOliv1
Copy link
Author

SOliv1 commented Feb 27, 2022

bytes of china

Building and designing a database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment