D
D
drawnofmymind2020-02-13 19:10:35
JavaScript
drawnofmymind, 2020-02-13 19:10:35

How to export and include native function from public/app.js to node.js file?

How to export and include native function from public/app.js to node.js file?
(I hope I phrased my question correctly)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Loli E1ON, 2020-02-13
@drawnofmymind

exports.bar = () => {...}
const f = require('app.js');
f.bar();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question