JavaScript Array from() Method Last Updated : 15 Jul, 2024 Comments Improve Suggest changes Like Article Like Report The JavaScript Array from() method returns an Array object from any object with a length property or an iterable object. Syntax : Array.from(object, mapFunction, thisValue)Parameters:object: This Parameter is required to specify the object to convert to an array.mapFunction: This Parameter specifies the map function to call on each item of the array.element: It specifies the current element.currentIndex: This Parameter specifies the array index of the current element.thisValue: This Parameter specifies the value to use as this when executing the mapFunction.Return Value: It returns an array object or instance of an arrray. Example 1: In this example, we will be using Array from() method to create an array from the string value. JavaScript // Creating array from input string let myArr = Array.from( "GeeksForGeeks"); // Display output console.log(myArr); Output[ 'G', 'e', 'e', 'k', 's', 'F', 'o', 'r', 'G', 'e', 'e', 'k', 's' ]Example 2: In this example, we will be using Array from() method to create an array from the string value. JavaScript // Creating array form the given string let myArr = Array.from("45878965412365"); // Display output console.log(myArr); Output[ '4', '5', '8', '7', '8', '9', '6', '5', '4', '1', '2', '3', '6', '5' ] We have a complete list of Javascript Array methods, to check those please go through this Javascript Array Complete reference article.Supported Browsers:Chrome 51 Edge 15 Firefox 54 Safari 10 Opera 38 Comment More infoAdvertise with us Next Article JavaScript Array from() Method R rathbhupendra Follow Improve Article Tags : JavaScript Web Technologies javascript-array JavaScript-Methods Similar Reads Interview Preparation Interview Preparation For Software Developers Must Coding Questions - Company-wise Must Do Coding Questions - Topic-wise Company-wise Practice Problems Company Preparation Competitive Programming Software Design-Patterns Company-wise Interview Experience Experienced - Interview Experiences Internship - Interview Experiences Practice @Geeksforgeeks Problem of the Day Topic-wise Practice Difficulty Level - School Difficulty Level - Basic Difficulty Level - Easy Difficulty Level - Medium Difficulty Level - Hard Leaderboard !! Explore More... Data Structures Arrays Linked List Stack Queue Binary Tree Binary Search Tree Heap Hashing Graph Advance Data Structures Matrix String All Data Structures Algorithms Analysis of Algorithms Searching Algorithms Sorting Algorithms Pattern Searching Geometric Algorithms Mathematical Algorithms Randomized Algorithms Greedy Algorithms Dynamic Programming Divide & Conquer Backtracking Branch & Bound All Algorithms Programming Languages C C++ Java Python C# Go Lang SQL PHP Scala Perl Kotlin Web Technologies HTML CSS JavaScript Bootstrap Tailwind CSS AngularJS ReactJS jQuery NodeJS PHP Web Design Web Browser File Formats Computer Science Subjects Operating Systems DBMS Computer Network Computer Organization & Architecture TOC Compiler Design Digital Elec. & Logic Design Software Engineering Engineering Mathematics Data Science & ML Complete Data Science Course Data Science Tutorial Machine Learning Tutorial Deep Learning Tutorial NLP Tutorial Machine Learning Projects Data Analysis Tutorial Tutorial Library Python Tutorial Django Tutorial Pandas Tutorial Kivy Tutorial Tkinter Tutorial OpenCV Tutorial Selenium Tutorial GATE CS GATE CS Notes Gate Corner Previous Year GATE Papers Last Minute Notes (LMNs) Important Topic For GATE CS GATE Course Previous Year Paper: CS exams DevOps Git Tutorial AWS Tutorial Docker Tutorial Kubernetes Tutorial Microsoft Azure Tutorial QUIZ Section C Quiz C++ Quiz Java Quiz Python Quiz HTML Quiz CSS Quiz JavaScript Quiz Data Structures Quiz Algorithms Quiz Topic-wise MCQs School Content CBSE Board CBSE Notes 2023-24 CBSE Class 8 Notes CBSE Class 9 Notes CBSE Class 10 Notes CBSE Class 11 Notes CBSE Class 12 Notes School Programming English Grammar Commerce Commerce Accountancy Business Studies Economics Human Resource Management Management Income Tax Finance Puzzles Puzzles Top 100 Puzzles Mathematical Riddles Like