Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

JavaScript Assignment 03

A collection of JavaScript problem-solving exercises focused on working with objects, arrays, strings, array methods, input validation, and debugging.

📌 Overview

This assignment contains five JavaScript problems designed to practice fundamental and intermediate JavaScript concepts. The solutions focus on validating input, processing arrays and objects, manipulating strings, and using modern array methods to solve practical programming challenges.


🛠️ Technologies Used

  • JavaScript (ES6)

📂 Problems & Features

1️⃣ Student Introduction Generator

A function that generates a student's introduction using information from an object.

Features:

  • Validates that the input is a valid object
  • Checks for required properties: name, age, and course
  • Uses Object.keys() for property validation
  • Uses template literals to generate the introduction
  • Returns "Invalid" for incorrect or incomplete input

2️⃣ Active User Filter

A function that filters active users from an array of user objects.

Features:

  • Validates that the input is a non-empty array
  • Validates each user object
  • Checks for required properties: name and isActive
  • Uses the filter() method
  • Returns only users where isActive is true

3️⃣ Trending Hashtag Counter

A function that analyzes a caption and finds hashtag-related information.

Features:

  • Validates that the input is a string
  • Splits the caption into individual words
  • Finds words starting with #
  • Counts the total number of hashtags
  • Finds the longest hashtag
  • Returns the results as an object

4️⃣ Bonus Score Calculator

A function that adds bonus points to scores and calculates the final total.

Features:

  • Validates that the input is a non-empty array
  • Checks that all values are numbers
  • Uses map() to add bonus points
  • Uses reduce() to calculate the total score

5️⃣ Debugging Challenge – AI Leaderboard Generator

A debugging challenge that generates a leaderboard from student data.

Features:

  • Validates the student array
  • Checks for required name and score properties
  • Validates that scores are numbers
  • Filters students with scores of 70 or higher
  • Converts qualified student names to uppercase
  • Returns the first three qualified students

🧠 Concepts Practiced

This assignment demonstrates the use of:

  • Functions
  • Objects
  • Arrays
  • Input Validation
  • Conditional Statements
  • Loops
  • String Methods
  • Template Literals
  • Object.keys()
  • Array.isArray()
  • filter()
  • map()
  • reduce()
  • slice()
  • Debugging
  • Problem Solving

📦 Dependencies

This project does not use any external dependencies or packages.

Only core JavaScript is required.


🚀 How to Run Locally

1. Clone the repository

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY-NAME.git

About

JavaScript Assignment 03 featuring solutions to programming problems using modern JavaScript concepts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages