⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
collect.js
/
docs
/
api
/
Edit File: toArray.md
# `toArray()` The toArray method converts the collection into a plain array. If the collection is an object, an array containing the values will be returned. ```js const collection = collect([1, 2, 3, 'b', 'c']); collection.toArray(); // [1, 2, 3, 'b', 'c'] ``` ```js const collection = collect({ name: 'Elon Musk', companies: ['Tesla', 'Space X', 'SolarCity'], }); collection.toArray(); // ['Elon Musk', ['Tesla', 'Space X', 'SolarCity']] ``` [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/toArray.js)
Simpan