Skip to content

💄 update reverse array example to modern syntax #3268

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lregaladohdez
Copy link

Description of Problem

This is not a problem but a stylistic suggestion.

The example currently uses [...array].reverse(), which can be simplified using a more modern and concise syntax.

Proposed Solution

Suggest using the simpler:

array.toReversed()

This achieves the same result reversing the array without mutating the original, but in a cleaner and more modern way.

Additional Information

array.toReversed() was introduced in ECMAScript 2023

Suggest `arr.toReversed()` instead of construction `[...array].reverse()` offering a more modern and simpler solution
Copy link

netlify bot commented Jul 20, 2025

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit c7db91b
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/687caedbfab8240008cd5f6b
😎 Deploy Preview https://deploy-preview-3268--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant