What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-04 20:34:10
copy text from file to another file in javascript with fs
'use strict'; import fs from 'fs'; let fileContent = 'Anything what you want'; let message = fs.writeFileSync('message.txt', fileContent); function copyContent(fileName: string, dest: string): boolean { try { fs.copyFileSync(fileName, dest); ... Add solution -
Javascript 2021-10-24 23:44:05
how to search through a table javascript
(function() { 'use strict'; var TableFilter = (function() { var Arr = Array.prototype; var input; function onInputEvent(e) { input = e.target; var table1 = document.getElementsByClassName(input.getAttribute('data-table')); ... Add solution -
Javascript 2021-10-13 23:32:06
use strict javascript
//It's a new feature of ECMAScript 5. //With strict mode, you can not, for example, use undeclared variables. Insert a 'use strict'; statement on top of your script: /***START ANY JS FILE***/ 'use strict'; var a = 2; .... /***END***/ Or, insert a 'use ... Add solution -
Javascript 2021-10-13 13:27:11
get the name of month without using hard coded arrays in javascript
'use strict'; (function(d){ var mL = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; var mS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'N... Add solution -
Javascript 2021-10-13 10:07:04
use strict' in javascript
//It's a new feature of ECMAScript 5. //With strict mode, you can not, for example, use undeclared variables. Insert a 'use strict'; statement on top of your script: /***START ANY JS FILE***/ 'use strict'; var a = 2; .... /***END***/ Or, insert a 'use ... Add solution -
Other 2021-10-03 14:21:03
image left rext right CodePen
<!DOCTYPE html> <html lang="en-US"> <head> <title>JavaScript Table Filter Search</title> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel=&qu... Add solution -
Javascript 2021-09-29 06:27:03
write json file in node js
'use strict'; const fs = require('fs'); let student = { name: 'Mike', age: 23, gender: 'Male', department: 'English', car: 'Honda' }; let data = JSON.stringify(student, null, 2); fs.writeFile('student-3.json', data, (err) =>... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5