Answers for "how to add copyable txt js"

1

how to copy text in js

const copyOnClipboard = (txt) => navigator.clipboard.writeText(txt)
Posted by: Guest on August-06-2021
0

copy file javascript

//copyfile.js
const fs = require('fs');

// destination will be created or overwritten by default.
fs.copyFile('C:folderAmyfile.txt', 'C:folderBmyfile.txt', (err) => {
  if (err) throw err;
  console.log('File was copied to destination');
});
Posted by: Guest on March-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language