Skip to content

data types#1

Open
shayhoffman wants to merge 2 commits intogh-pagesfrom
class1-data
Open

data types#1
shayhoffman wants to merge 2 commits intogh-pagesfrom
class1-data

Conversation

@shayhoffman
Copy link
Owner

class 1 project

Copy link

@reneemeyer reneemeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Shay, great start, just a few comments, other than that your methods look good.

@@ -0,0 +1,70 @@
1. Write a JavaScript program to display the current day and time.
function findTime(){
const now = new Date(); //find date

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to indent for readability.

@@ -0,0 +1,70 @@
1. Write a JavaScript program to display the current day and time.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment //1. Write a JavaScript program to display the current day and time. . Without, you will throw an error.


findTime();

2. Write a JavaScript program to convert a number to a string.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error

numToString(30)


3. Write a JavaScript program to convert a string to the number.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error

stringToNum('89')


4. Write a JavaScript program that takes in different datatypes and prints out what type they are.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error

dataType('eklgjheoh')


5. Write a JavaScript program that adds 2 numbers together.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error

}
sumNumbers(7, 3000)

6. Write a JavaScript program that runs only when 2 things are true.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error

bothTrue(4, 6);
bothTrue(null, 6);

7. Write a JavaScript program that runs when 1 of 2 things are true.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a comment, without, you will throw an error


7. Write a JavaScript program that runs when 1 of 2 things are true.

function oneTrueThing(time) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function evaluates if time is less than 20, I need a function that returns if one argument evaluates to true. See the above problem for a starting off point.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants