Answers for "js read js file"

15

load js file

<script type="text/javascript" src="path-to-javascript-file.js"></script>
Posted by: Guest on March-08-2020
2

read file javascript

// As with JSON, use the Fetch API & ES6
fetch('something.txt')
  .then(response => response.text())
  .then(data => {
  	// Do something with your data
  	console.log(data);
  });
Posted by: Guest on March-15-2020

Browse Popular Code Answers by Language