DEV Community

Charlotte Fereday
Charlotte Fereday

Posted on

Visualising documentation: JavaSript array.of

Alt Text

Today’s function is array.of(), mdn description here.

This function creates an array from whatever it has been given. Sounds a lot like array.from() right?

The difference is array.of can take multiple parameters, so works especially well if there are many things to add to the array, i.e. numbers. Whilst array.from can only takes one parameter, so works well especially with a string to split each char into an element in the array.

Another difference between array.from is that if array.of is passed an array and a function it won't apply the function to each element in the array like array.from but instead stores the function in the array.

Would welcome any comments on good situations to use this function.

I've done my own version of the docs with sketches together. Here’s the folder for array.of. Check out the readme to see how you can run the examples.

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay