r/javascript • • Mar 18 '19

What's your favorite, most useful javascript one-liner?

385 Upvotes

422 comments sorted by

View all comments

Show parent comments

14

u/Oririner Mar 19 '19

just copy(yo) ;)

(in Chrome DevTools)

2

u/thisguyfightsyourmom Mar 19 '19

You’re telling me I’ve learned what the second arg in console.log for nothing?!

It’s nice for inspecting objects (readably) in test suites too—quick,… someone tell me the smarter way to do that too

2

u/Oririner Mar 19 '19

It sounds like you're not debugging the test suites in Chrome DevTools.

you should do that instead ;) just add --inspect-brk when running the node process and follow the instructions.