From 2230ac817bbb36658a88c85ff14333c9fc55abd1 Mon Sep 17 00:00:00 2001 From: CHAKKA PHANI SIMHA <92540986+c1phani1simha@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:51:04 +0530 Subject: [PATCH] Added content to the Running Scripts in Node.js - npm (#2294) * Edited the typeof operator file * Update 104-running-scripts.md * Added the content to the stack-trace.md * Added content for the 104-asyn-errors.md file * Update content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md Co-authored-by: Kamran Ahmed --- .../102-javascript-datatypes/102-typeof-operator.md | 4 ++-- .../content/102-nodejs-npm/104-running-scripts.md | 4 ++-- .../content/103-nodejs-error-handling/100-stack-trace.md | 8 +++++++- .../content/103-nodejs-error-handling/104-async-errors.md | 7 ++++++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/content/roadmaps/106-javascript/content/102-javascript-datatypes/102-typeof-operator.md b/content/roadmaps/106-javascript/content/102-javascript-datatypes/102-typeof-operator.md index 6b2407ce7..07a15bc89 100644 --- a/content/roadmaps/106-javascript/content/102-javascript-datatypes/102-typeof-operator.md +++ b/content/roadmaps/106-javascript/content/102-javascript-datatypes/102-typeof-operator.md @@ -1,6 +1,6 @@ -# Typeof Operator +# TypeOf Operator -You can use the typeof operator to find the data type of a JavaScript variable. +You can use the typeOf operator to find the data type of a JavaScript variable. Typeof Reference Typeof Live Examples \ No newline at end of file diff --git a/content/roadmaps/107-nodejs/content/102-nodejs-npm/104-running-scripts.md b/content/roadmaps/107-nodejs/content/102-nodejs-npm/104-running-scripts.md index ed9f229ee..7f12efdca 100644 --- a/content/roadmaps/107-nodejs/content/102-nodejs-npm/104-running-scripts.md +++ b/content/roadmaps/107-nodejs/content/102-nodejs-npm/104-running-scripts.md @@ -1,8 +1,8 @@ # Running Scripts -Scripts are defined in the `package.json` file under the **scripts** tag. -To run a script called "myScript" -- run `npm run myScript` and it'll execute the commands defined in the `package.json` file +In Node.js, npm scripts are used for the purpose of initiating a server, starting the build of a project, and also for running the tests. We can define this scripts in the package.json file of the folder. Also, we can split the huge scripts into many smaller parts if it is needed. Free Content +Example of Running Scripts Introduction to NPM Scripts Running Scripts diff --git a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md index 1a4844dee..c416b0664 100644 --- a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md +++ b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/100-stack-trace.md @@ -1 +1,7 @@ -# Stack trace \ No newline at end of file +# Stack trace + +If any error occurs during the execution of the program, Stack trace will be displayed automatically by the JVM for its indication. All the active stack frames at a particular instance during the execution of the program can be traced by the stack trace. This is very helpful for the debuggers because during the code debugging, we can easily identify at which point the error had occurred. + +Free Content +What is Stack trace? +Multiple ways to log the stack trace in node.js \ No newline at end of file diff --git a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/104-async-errors.md b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/104-async-errors.md index af35a107f..affaa2ea6 100644 --- a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/104-async-errors.md +++ b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/104-async-errors.md @@ -1 +1,6 @@ -# Async errors \ No newline at end of file +# Async errors + +Errors must always be handled. If you are using synchronous programming you could use a try catch. But this does not work if you work asynchronous!Async errors will only be handled inside the callback function! + +Free Content +Asyn Errors \ No newline at end of file