When do you need to create a custom object in js

Junior front-end advice, I usually create built-in objects such as Date,Array through new in js. It is rare to create custom objects through constructors. Under what circumstances is it better to use custom objects?

Mar.19,2021

when you need to use a constructor, it's usually time to reuse code.
for example, you have two sections on a page that use paging, so it's impossible to copy and paste, is it?
We can write a constructor to reuse

  

js will be used if you write too much, such as encapsulating your own method library component framework

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35415-e4cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35415-e4cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?