Syntax - Tasty Web Development Treats cover image

JS One Liners

Syntax - Tasty Web Development Treats

A Little Trick You Can Use to Destruct an Array

3min Snip

00:00
Play full episode
A, there is a little trick you can do as you jason stringfy your object or ray and then use a the next argument is nothing. And then you can dump that into a pre element. A pre element will ntain any spaces, and then just has a nice view. I have a reat component called dump. If you look on m p m west boss forsas dump, and it's exactly for that. Ye, just want to view the data as part of your application and not in your console. That's what yo is. Sa, if you want a de structure, if you wants to get the first and last items from an array in a single dstructure

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode