From 83cf39545369aae9368bcc81bc840f52b95f500f Mon Sep 17 00:00:00 2001 From: jakub-g Date: Wed, 7 Dec 2022 19:18:19 +0100 Subject: [PATCH] node.js: evaluate + print can be done via `node -p` --- markup/scripting | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/markup/scripting b/markup/scripting index 0ea0fa9..af5d349 100644 --- a/markup/scripting +++ b/markup/scripting @@ -20,7 +20,8 @@ const _ = require('lodash');||import os, re, sys||##gray|# sudo apt install php- @< >@||$ node foo.js||$ python foo.py||$ php -f foo.php||$ ruby foo.rb|| ||[[# repl]][#repl-note repl] _ @< >@||$ node||$ python||$ php -a||$ irb|| -||[[# cmd-line-program]][#cmd-line-program-note command line program]||$ node -e "console.log('hi!');"||$ python -c 'print("hi!")'||$ php -r 'echo "hi!\n";'||$ ruby -e 'puts "hi!"'|| +||[[# cmd-line-program]][#cmd-line-program-note command line program]||$ node -e "console.log('hi!');" +$ node -p "'hi!'"||$ python -c 'print("hi!")'||$ php -r 'echo "hi!\n";'||$ ruby -e 'puts "hi!"'|| ||[[# block-delimiters]][#block-delimiters-note block delimiters] _ @< >@||{}||: ##gray|//and offside rule//##||{}||{} _ do end|| @@ -4885,4 +4886,4 @@ Ruby MRI threads are operating system threads, but a global interpreter lock pre [[# wait-on-thread-note]] ++ [#wait-on-thread wait on thread] -How to make a thread wait for another thread to finish. \ No newline at end of file +How to make a thread wait for another thread to finish.