Is there a php echo/print equivalent in javascript

You need to use document.write() Note that this will only work if you are in the process of writing the document. Once the document has been rendered, calling document.write() will clear the document and start writing a new one. Please refer to other answers provided to this question if this is your use case.

Color echo in batch files

It’s probably easier if you call a custom C++ program. Although it’s not really necessary to do something like this, it’s possible. There’s a pre-made C++ script compiled into something Windows can run at http://www.codeproject.com/Articles/17033/Add-Colors-to-Batch-Files The site explains mostly everything you need to know, but I’ll give some help an examples here. The color codes you can use … Read more

Multi-line string with extra space (preserved indentation)

Heredoc sounds more convenient for this purpose. It is used to send multiple commands to a command interpreter program like ex or cat The string after << indicates where to stop. To send these lines to a file, use: You could also store these lines to a variable: This stores the lines to the variable named VAR. When printing, remember the … Read more

Multi-line string with extra space (preserved indentation)

Heredoc sounds more convenient for this purpose. It is used to send multiple commands to a command interpreter program like ex or cat The string after << indicates where to stop. To send these lines to a file, use: You could also store these lines to a variable: This stores the lines to the variable named VAR. When printing, remember the … Read more