Συζητήσεις » Ανάπτυξη

Setting function to variable

§
Δημοσιεύτηκε: 19/05/2015

Setting function to variable

The script below use to work but now it doesn't. Can someone tell me why it fails and how I can get it working. Thanks

log.info = console.info;
log.log("TEST");
woxxomΣυντονιστής
§
Δημοσιεύτηκε: 19/05/2015
log = console.log.bind(console);
log("TEST");

This works if it's what you want to do.

§
Δημοσιεύτηκε: 19/05/2015

Thank you. Works well.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.

长期地址
遇到问题?请前往 GitHub 提 Issues。