Skip to content

Wenura17125/IT2234P

Repository files navigation

IT2234P Web Services and Server Technologies

JavaScript Node.js Code Quality

📚 A comprehensive collection of daily practical lessons for Web Services and Server Technologies course.

📋 Course Overview

This repository serves as a practical guide through various web services and server technologies. Each lesson is organized in dedicated folders containing both source code and visual outputs.

🗓️ Latest Session: JavaScript Basics (March 10, 2025)

🎯 Learning Objectives

  • Master console output operations using console.log()
  • Implement fundamental arithmetic operations
  • Understand loop structures and their applications
  • Create complex number sequence patterns

💻 Code Examples & Implementations

1. Basic Console Output (message.js)

console.log("**Print Message**");
console.log("Hello World");

View Output

2. Arithmetic Operations (arithmetics.js)

let x1=50, x2=10;
var add=x1+x2;
console.log("Addition: " +add);
var sub=x1-x2;
console.log("Substraction: " +sub);
var mul=x1*x2;
console.log("Mutiplication: " +mul);
var div=x1/x2;
console.log("Division: " +div);
console.log("Module: " +(x1%x2));

View Output

3. Loop Implementation Examples

3.1 Sequential Numbers (Question_01.js)
console.log("**Print numbers from 1 to 10**");
for(let i=1;i<=10;i++){
    console.log(i);
}

View Output

3.2 Odd Numbers (Question_02.js)
console.log("**Print odd numbers from 1 to 10**");
for(let j=0;j<=10;j++){
    if(j%2==1){
        console.log(j);
    }
}

View Output

3.3 Reverse Sequence (Question_03.js)
console.log("--Print numbers from 1 to 10 in reverse order--");
for(let k=10;k>=1;k--){
    console.log(k);
}

View Output

3.4 Advanced Pattern (Question_04.js)
console.log("**Reverse the numbers in left and right 4321-5-9876**");
var i = 9;
var mid = parseInt(i/2) + 1;

for(var j= mid - 1; j>0; j--) {
    console.log(j);
}

console.log(mid);

for(var j = i; j>mid; j--) {
    console.log(j);
}

View Output

📊 Implementation Summary

Category File Description Output
Basic Output message.js Simple console output demonstration View
Mathematics arithmetics.js Core arithmetic operations View
Loops - Basic Question_01.js Sequential number generation View
Loops - Conditional Question_02.js Odd number filtering View
Loops - Advanced Question_03.js Reverse sequence implementation View
Pattern Generation Question_04.js Complex number pattern creation View

🔍 Technical Notes

  • All implementations are in pure JavaScript
  • Code follows ES6+ standards and best practices
  • Each example includes comprehensive console output
  • Visual outputs are captured for reference
  • Consistent code formatting and naming conventions

📖 Learning Path | 🛠️ Practical Examples | 📊 Visual Outputs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors