-
-
Notifications
You must be signed in to change notification settings - Fork 321
Glasgow | 26-ITP-Jan| Fattouma Ouannassi | Sprint 1 | coursework #957
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 all commits
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 |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| /* This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
|
|
||
| //Answer | ||
| //to write comments in JavaScript | ||
| /* we use two forward slashes for single line , and Slash and Asterisk for Multi-line comment | ||
| we comment out the two lines above to prevent them from being executed.*/ | ||
|
Comment on lines
+1
to
+7
Contributor
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. Great job! You have used a multiline comment accurately! But do you need the double slash comment inside a multiline comment?
Author
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. No, we do not need (double slashes) inside a multi-line comment. When we use /* to start and */ to end a multi-line comment, everything between them is already treated as a comment, so adding // inside it is unnecessary. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you describe what's happening on Line 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 3 takes the current value of count, adds 1 to it, and stores the new value back in count.