Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
NodeJS is possible in android from termux, i've been using it. but only limited version are available.
26th Sep 2020, 6:40 AM
Rei
Rei - avatar
+ 4
In NodeJS, yes. In web browser-based JavaScript, almost always no. In NodeJS, there are examples writing files at: https://nodejs.dev/learn/writing-files-with-nodejs For web-browser-based JavaScript, you mostly can't write files. The extremely rare exceptions are mentioned at: https://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm
26th Sep 2020, 5:55 AM
Josh Greig
Josh Greig - avatar
26th Sep 2020, 6:52 AM
David Carroll
David Carroll - avatar
+ 3
Rei, if defining data for a download link without depending on the server is all Ligas needs, yeah that's a good answer. I wouldn't say that's JavaScript writing a file, though. JavaScript would still have very little control over how that download link works. For example, the browser will determine the directory and likely add a (1), (2)... if a file with the same name already exists. I actually used the trick you're talking about to generate frames for https://www.youtube.com/watch?v=6oTEzDDTsnU from https://code.sololearn.com/WVhoMHzy3K81.
26th Sep 2020, 6:32 AM
Josh Greig
Josh Greig - avatar
+ 2
its not allowed in sololearn app, but possible in normal browser
26th Sep 2020, 6:25 AM
Rei
Rei - avatar
+ 2
if you have a laptop so,.node.js , p5.js or some options are available or if you have not a laptop only a smartphone so,you can like in Sololearn where html css ..there js is available also so, there you can do it or if you don't like to in js so, you can do js in html also with script tag ....
27th Sep 2020, 4:34 AM
KashishAggarwal
KashishAggarwal - avatar
+ 2
You can make JavaScript file name: "file name".js. And I was like sublime text it's program very nice to web-programmer.
27th Sep 2020, 3:29 PM
ElviDem
ElviDem - avatar
+ 1
Josh Greig how about making the files in memory then "download" it ? by using <a href="data:mime/type;encodedFile" />
26th Sep 2020, 6:13 AM
Rei
Rei - avatar
+ 1
Ligas said, "That good but in my phone is not allowed" Ligas, you don't have a laptop or desktop? Yes, running NodeJS on a phone is something I never tried. I always program on a laptop or desktop. A big keyboard and screen is very helpful for programming.
26th Sep 2020, 6:37 AM
Josh Greig
Josh Greig - avatar
+ 1
Yes you can make file
26th Sep 2020, 12:39 PM
Mohit Kumar
Mohit Kumar - avatar
+ 1
Just see a tutorial
27th Sep 2020, 3:57 PM
Karla
Karla - avatar
+ 1
Just make a file with extension of .js Example: My_file.js (NOTE: inside .js file no need to add <script> tag just start writing code) Next step: you can add file name in script tag inside HTML FILE (keep .html and .js file in same folder) Inside HTML file: <script src="My_file.js"><script> ADD THE ABOVE LINE AFTER BODY TAG. And you are good to go... 😇😇😇👍👍👍
27th Sep 2020, 6:54 PM
Neeraj Kumar
+ 1
I didn't understand the question. Do you want to include .js file or create any file using js
28th Sep 2020, 3:05 AM
Charan Leo25
Charan Leo25 - avatar
0
its just a possible workaround that i think worth mentioning, thanks for more clarification Josh Greig on that :D
26th Sep 2020, 6:38 AM
Rei
Rei - avatar
0
And program for android "Spck Editor" it's program don't using internet and it's very nice👌.
27th Sep 2020, 3:32 PM
ElviDem
ElviDem - avatar