Student Activity
Student Activity (30-min)
Step-by-Step Procedure
Install Node.js on Personal Laptops (15 min):
Follow the installation steps based on your operating system.
Verify using
node -vandnpm -v.
Experiment with the REPL (15 min):
Open the terminal and type
nodeto enter the REPL.Try the following commands:
javascript코드 복사// Calculate the square of a number let x = 5; x * x; // Concatenate two strings let firstName = 'Node'; let lastName = 'JS'; firstName + ' ' + lastName; // Create and call a function function greet(name) { return 'Hello, ' + name + '!'; } greet('World');Discuss findings and share outputs with peers.
Last updated