class NetworkError extends Error {
constructor(msg) { super(msg); this.name = 'NetworkError' }
}Extend Error to create application-specific error types with custom names.
Creating an array with a negative length throws a RangeError.
Challenge: Verify the error is thrown.