-
-
Notifications
You must be signed in to change notification settings - Fork 195
Sheffield | May-2025 | Hassan Osman | Sprint-1 #469
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
base: main
Are you sure you want to change the base?
Changes from 9 commits
209ea8f
cf11f38
9751116
c263fad
8ab5a4e
e8108f8
5c1b48b
2a36aae
064ecb3
547fbeb
608f18d
47d435e
408a4f2
e57e590
d1e40e4
b0469be
a6e7a48
1042135
6dd1748
a6bfabe
41eff9e
d94c7bd
5203cb7
616652d
ec14852
7c5701d
c93411c
a9cdc03
cac3613
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ Now try invoking the function `prompt` with a string input of `"What is your nam | |
What effect does calling the `prompt` function have? | ||
//prompt expect input from the user by showing a small window with space for input to be submitted once called. | ||
What is the return value of `prompt`? | ||
//undefined | ||
//a string - the name entered my the user. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you were writing a program that uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when clicking ok it displays a string if the user entered a value otherwise, it leads to an empty string. when clicking cancel it displays null. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, I don't know how to answer this apart from the fact that when ok clicked the user's input is returned otherwise in cancellation null is returned. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The term "display" in your original comment suggested you are referring to the values output by Returns is the standard technical term for what a function "generates". It aligns with programming language terminology. Your latest description is correct.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks CJ! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ Try also entering `typeof console` | |
Answer the following questions: | ||
|
||
What does `console` store? | ||
//console doesn't store. it displays. | ||
//it stores different logging, debugging, warning/errors and information properties. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are these logging, debugging, ... properties? Are they numbers, strings, or ....? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are indeed properties - Pairs of keys and their corresponding values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Saying " There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Hopefully, my response is sufficient now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Describing code can be quite challenging at first (even in your native language). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted. Really appreciate your feedback :) |
||
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean? | ||
//console.log log or display values to the console. Console.assert, check if a condition is true and in this case no output. Otherwise, an | ||
// error message shows. As for the `,`, it's called the dot notation and it's used to access properties and methods of an object. |
Uh oh!
There was an error while loading. Please reload this page.