Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
itslennysfault
on Jan 20, 2023
|
parent
|
context
|
favorite
| on:
Pipe Operator (|>) For JavaScript
Uncaught TypeError: Cannot read properties of undefined (reading 'periods')
tgv
on Jan 20, 2023
[–]
:3,$s/\./?./g
Solves all your problems without having to think.
leipert
on Jan 20, 2023
|
parent
[–]
periods could be null. So you would need to optional chain the array access also.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: