79752555

Date: 2025-09-01 13:16:01
Score: 1.5
Natty:
Report link

How about this:

if ((typeof process !== 'undefined') && 
(process.release.name.search(/node|io.js/) !== -1)) {
    console.log('this script is running on the server');
} else {
    console.log('this script is running in client side');
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): How
  • Low reputation (1):
Posted by: Dragos