Skip to content
Open
Show file tree
Hide file tree
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
35 changes: 20 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ Do the following:

HINT: no function required
*/


var votingAge = 18;
if (votingAge >= 18){console.log (true)};
if (votingAge<18){console.log(false)};


/*
Task 1b - Values
Expand All @@ -30,10 +32,9 @@ Do the following:

HINT: no function required
*/




var myage = "49";
var addtomyage ="1";
myage + addtomyage;

/*
Task 1c - Convert Strings to Numbers
Expand All @@ -45,8 +46,8 @@ Do the following:

HINT: look up the Number method
*/


let myString = Number("1999");
console.log(myString);


/*
Expand All @@ -58,9 +59,10 @@ Do the following:
3. Multiply a and b and return the answer
*/

function multiply(/*add your code here*/){
/*add your code here*/
}
function multiply(a=5,b=10)
{{return a*b;}
console.log(multiply(5,10))




Expand All @@ -74,10 +76,13 @@ Do the following:
3. Return the newly calculated age
*/

function dogYears(/*add your code here*/){
/*add your code here*/
function dogYears(age)
{
var chiefsAge = 7*age;
console.log("Chief is " + chiefsAge + " this old in dog age")

}

dogYears(2)


/*🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 Task 3 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀*/
Expand Down Expand Up @@ -107,7 +112,7 @@ Use the hungryDog function and feeding requirements below to do the following:
NOTE: If done correctly, a weight of 15 lbs and age of 1 year would return 0.44999999999999996
*/

function hungryDog(/*add your code here*/){
function hungryDog( /*add your code here*/){
/*add your code here*/
}

Expand Down
Loading