Skip to content
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

[Term Entry] Dart Type Conversion .toString() #4598

Merged
merged 10 commits into from May 10, 2024

Conversation

Vizhou19
Copy link
Contributor

@Vizhou19 Vizhou19 commented Apr 30, 2024

Description

Issue Solved

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@CLAassistant
Copy link

CLAassistant commented Apr 30, 2024

CLA assistant check
All committers have signed the CLA.

@letsbuildanything letsbuildanything self-assigned this Apr 30, 2024
@letsbuildanything letsbuildanything added new entry New entry or entries status: under review Issue or PR is currently being reviewed dart Dart entries labels Apr 30, 2024
@letsbuildanything letsbuildanything linked an issue May 2, 2024 that may be closed by this pull request
3 tasks
Copy link
Collaborator

@letsbuildanything letsbuildanything left a comment

Choose a reason for hiding this comment

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

@Vizhou19
I've requested some changes. Please take a moment to address them. If you have any concerns or reasons to reject specific suggestions, feel free to discuss them.
Additionally, please ensure that you've signed the CLA.

@@ -0,0 +1,48 @@
---
Title: '.toString()'
Description: 'Returns a string which represents the underlying type.'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Description: 'Returns a string which represents the underlying type.'
Description: 'Converts the object into a string representation.'

- paths/computer-science'
---

In Dart, the **`.toString()`** method Returns a string representation of an object.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
In Dart, the **`.toString()`** method Returns a string representation of an object.
In Dart, the **`.toString()`** method converts the object into a string representation.

## Syntax

```pseudo
val.toString()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
val.toString()
typeObject.toString()

Comment on lines 25 to 26

Above, `val.toString()` is calling the `toString()` method on the object `val`. This method returns a string representation of the object.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Above, `val.toString()` is calling the `toString()` method on the object `val`. This method returns a string representation of the object.


## Example

In the Example below, the `.toString()` method is used to convert numbers to a string.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
In the Example below, the `.toString()` method is used to convert numbers to a string.
The following example demonstrates the usage of the `.toString()` method:

The code shown above will generate the output:

```shell
'123'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
'123'
123

Comment on lines 46 to 48



Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Note:** The output `123` is a string. This can be confirmed by checking `result is String` and `result.runtimeType`.

@Vizhou19
Copy link
Contributor Author

Vizhou19 commented May 2, 2024

Made some changes.

Copy link
Collaborator

@letsbuildanything letsbuildanything left a comment

Choose a reason for hiding this comment

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

@Vizhou19
Thank you for contributing in the Codecademy Docs!
It seems good for second review.

@mamtawardhani mamtawardhani self-assigned this May 3, 2024
@mamtawardhani mamtawardhani added status: under review Issue or PR is currently being reviewed and removed status: ready for next review labels May 3, 2024
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Hey @Vizhou19! Thank you for contributing to the Codecademy Docs!

I've suggested some changes, could you please review and modify those at your earliest convenience? Thanks!

Comment on lines 5 to 7
- 'Computer Science'
- 'Mobile Development'
- 'Code Foundations'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 'Computer Science'
- 'Mobile Development'
- 'Code Foundations'
- 'Code Foundations'
- 'Computer Science'
- 'Moble Development'

Comment on lines 9 to 12
- 'Dart'
- 'Data Types'
- 'Strings'
- 'Method'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 'Dart'
- 'Data Types'
- 'Strings'
- 'Method'
- 'Dart'
- 'Data Types'
- 'Methods'
- 'Strings'

Comment on lines 14 to 15
- 'learn-dart'
- paths/computer-science'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 'learn-dart'
- paths/computer-science'
- 'learn-dart'
- 'paths/computer-science'

123
```

**Note:** The output `123` is a string. This can be confirmed by checking `result is String` and `result.runtimeType`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
**Note:** The output `123` is a string. This can be confirmed by checking `result is String` and `result.runtimeType`.
> **Note:** The output `123` is a string. This can be confirmed by checking `result is String` and `result.runtimeType`.

@Vizhou19
Copy link
Contributor Author

Vizhou19 commented May 8, 2024

Made the changes

Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes @Vizhou19!

Looks good to me!

@mamtawardhani mamtawardhani merged commit 3706b1e into Codecademy:main May 10, 2024
6 checks passed
Copy link

👋 @Vizhou19
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 Your contribution(s) can be seen here:

https://www.codecademy.com/resources/docs/dart/type-conversion/toString

Please note it may take a little while for changes to become visible.
If you're appearing as anonymous and want to be credited, see here.

achur00 pushed a commit to achur00/Codecademy-docs that referenced this pull request May 11, 2024
* First Commit for toString() dart

* Update toString.md

* minor changes

* Updated toString.md

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Term Entry] Dart Type Conversion .toString()
4 participants