0
Difference among the apps. Which is true?
Hi, all! I'm new here, newbie in programming. And i start with Javascript first. So.. one of the difference that i've found is, in this app, we must type "document.write(example)" to see the output, but i see in other app, it must "print('example')" to see the output/result. So which is the true one? or it's all true? or it's all false? Thanks
6 Réponses
+ 6
In javascript print() opens the printer dialog box where you can print the current document on a paper. It has nothing to do with printing to the screen.
+ 1
I think you're mixing JS with Python 3 here. Can you check once?
+ 1
Both methods are available in JavaScript:
https://www.w3schools.com/jsref/met_doc_write.asp
https://www.w3schools.com/jsref/met_win_print.asp
Most of the time, I would recommend neither because the developer is expecting to create something with substance in the DOM and not just temporary output, but it really depends on what you're actually trying to accomplish.
0
I am learning with Grasshopper app too. It's said, it's a Javascript. but, when i try javascript in this app, there's that difference. So yeah, i'm confuse right now. Is python 3 similar with Javascript?
0
i don't really understand yet. But i will as the time passed by. This is my second day, so i think it's normal. Thanks, anyway
0
so, only document.write() to print screen?