Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated instructions #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 21 additions & 40 deletions exercises.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*/



/*
* #4
* Function - mustBeTrue
Expand All @@ -71,7 +70,6 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*/



/*
* #5
* Function - bigBird
Expand All @@ -80,12 +78,11 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
* @param Datatype: String `word`
* @return Datatype: String
*
* The function will return the message "Word to Big Bird!", if the string passed into the function is a three-letter word.
* The function will return the message "Word to Big Bird!", if the string passed into the function is a three-letter word.
* Console.log your result.
*/



/*
* #6
* Function - isEqual
Expand All @@ -95,7 +92,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
* @param Datatype: String `second`
* @return Datatype: String
*
* If the strings are equal, the function will return the message "You look mahvelous!" Otherwise, return the message: "I don't know who you are anymore."
* If the strings are equal, the function will return the message "You look mahvelous!" Otherwise, return the message: "I don't know who you are anymore."
* Console.log your result.
*/

Expand All @@ -109,7 +106,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
* @param Datatype: String `second`
* @return Datatype: String
*
* If the strings are not equal, the function will return the message "Opposites do attract." Otherwise, return the message: "Cause it's like you're my mirror."
* If the strings are not equal, the function will return the message "Opposites do attract." Otherwise, return the message: "Cause it's like you're my mirror."
* Console.log your result.
*/

Expand All @@ -124,8 +121,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* The function will return true if the number passed into the function is greater than 100, otherwise it will return false.
* Console.log your result.
*/

*/


/*
Expand All @@ -140,8 +136,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* The function will return true if the sum of all the number values is greater than 30, otherwise it will return false.
* Console.log your result.
*/

*/


/*
Expand All @@ -154,8 +149,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* The function will return true if the number passed in is an even integer, otherwise it will return false.
* Console.log your result.
*/

*/



Expand All @@ -170,7 +164,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* If BOTH values are 21 or over, the function will return the message: "Welcome to the Legends Lounge." Otherwise, it will return the message: "Chuck E Cheese is across the street."
* Console.log your result.
*/
*/


/*
Expand All @@ -184,7 +178,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* If EITHER the number value is greater than or equal to 120 or the boolean value is true, then the function will return the message: "Congratulations on a job well done." Otherwise, return the message: "See you in summer school."
* Console.log your result.
*/
*/



Expand All @@ -198,7 +192,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
*
* The function will return the message: "You are riding Honolulu's Rail.", if the number value is less than 50, otherwise it will return the message: "You are riding an Amtrak.", if the number value is less than 100, and return the message: "Now you ballin' in the Shinkansen!", if the number value is greater than or equal to 100.
* Console.log your result.
*/
*/


/*
Expand All @@ -213,7 +207,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true
* Console.log budget and doughnutBought.
* Invoke your function again.
* Console.log budget and doughnutBought again.
*/


/*Final Boss*/
/*Create a function name dailySpecials which takes in a parameter: `special`.
Expand All @@ -238,9 +232,9 @@ for (var i = 0; i<toyotaModels.length; i++){
}


/*
/*
* #15
* Create a for loop that will iterate 5 times and console.log the following:
* Create a for loop that will iterate 5 times and console.log the following in your termial:
* "Player: 1"
* "Player: 2"
* "Player: 3"
Expand All @@ -249,7 +243,7 @@ for (var i = 0; i<toyotaModels.length; i++){
*/


/*
/*
* #16
* Create a for loop that will iterate and console.log each item in the array below:
*/
Expand All @@ -261,12 +255,12 @@ for (var i = 0; i<toyotaModels.length; i++){
* Function - sumItUp
* Declare a variable named `numArray` and assign it with an array of 5 random numbers of your choice.
* Declare a variable named `total` and assign it with a number value of 0.
*
*
* Create a function named sumItUp which takes a parameter: `arr`.
*
*
* @param Datatype: Array `arr`
* @return Datatype: Number
*
*
* The function will loop through and add up all the values in the array that is passed into the function and return the total.
* Console.log your result.
*/
Expand All @@ -283,9 +277,9 @@ for (var i = 0; i<toyotaModels.length; i++){
*
* The function will loop through the players array and will put all the even number indexed players in the `east` array and the rest in the `west` array.
* Console.log both the east and west arrays.
*/
*/

var players = ["Yao Ming", "BrookLin", " Jesus Shuttlesworth", "Manute Bol", "Sidney Deane", "World B Free"];
var players = ["Yao Ming", "BrookLin", " Jesus Shuttlesworth", "Manute Bol", "Sidney Deane", "World B Free", "The King"];
/*
* #19
* Function - subways
Expand All @@ -296,16 +290,16 @@ var players = ["Yao Ming", "BrookLin", " Jesus Shuttlesworth", "Manute Bol", "Si
*
* The function will loop through the array value and replace all the odd numbered indexed items with "Classic Tuna".
* Console.log your results.
*/
*/

var subOftheDay = ["Teriyaki Chicken", "Spicy Italian", "Turkey", "BMT", "Black Forest Ham", "Meatball Marinara", "Veggie"];
var subOftheDay = ["Teriyaki Chicken", "Spicy Italian", "Turkey", "BMT", "Black Forest Ham", "Meatball Marinara", "Veggie", "Tuna"];


/*
Final Boss
* #20
* Function - removeLetter
* Create a function named `removeLetter`, which takes a parameter `str`.
* Create a function named `removeLetter`, which takes a parameter `str`.
*
* @param Datatype: String `str`
* @return Datatype: Array
Expand All @@ -314,16 +308,3 @@ Final Boss
*/

var phrase = "An apple a day keeps Alice feeling awesome!";