Open
Conversation
taqillion
reviewed
Feb 11, 2025
| fun main(){ | ||
| var double = 37.4 | ||
| var boolean = "true" | ||
| var char = 'S' |
There was a problem hiding this comment.
We should name our variables meaningful names that are descriptive.
Examples:
doublecan betemperaturebooleancan beisRainingcharcan befirstNameInitiail
taqillion
reviewed
Feb 11, 2025
| @@ -0,0 +1,8 @@ | |||
| fun main(){ | |||
| var double = 37.4 | |||
| var boolean = "true" | |||
There was a problem hiding this comment.
By setting the variable to "true", it does not set it as a boolean, but rather a string.
Why? Because you used quotation marks ". Boolean values don't need quotation marks. You should also use types to specifically avoid this issue
Author
|
thank you for the feedback! Clumsy mistake will proofread next time for sure 😊
I will fix them and push again
From: A-Taqi ***@***.***>
Date: Tuesday, 11 February 2025 at 8:02 PM
To: JoinCODED/Exercise-kotlin-variables-data-types ***@***.***>
Cc: sarahalenezi96 ***@***.***>, Author ***@***.***>
Subject: Re: [JoinCODED/Exercise-kotlin-variables-data-types] Sarah Alenezi (PR #23)
@A-Taqi commented on this pull request.
________________________________
In task/src/data_types.kt<#23 (comment)>:
@@ -0,0 +1,8 @@
+fun main(){
+ var double = 37.4
+ var boolean = "true"
By setting the variable to "true", it does not set it as a boolean, but rather a string.
Why? Because you used quotation marks ". Boolean values don't need quotation marks. You should also use types to specifically avoid this issue
—
Reply to this email directly, view it on GitHub<#23 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BPJNSRLHABDWWMPQI3N6N7T2PIUJLAVCNFSM6AAAAABW5QWERCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMBZGQYTMMBXGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Author
|
I fixed it and pushed again! I believe they're merged now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 1 completed