This a a sample project to test the idea of JavaScript
JavaScript 100.00%
js-for-react-native-11029640's Introduction
JavaScript Array Manipulation and User Profiles
Student ID: 11029640
Task 1: Array Manipulation
File: arrayManipulation.js
Function:processArray
Description: Takes an array of numbers as an argument and returns a new array where each even number is squared and each odd number is tripled.
Task 2: String Formatting Based on Numbers
File: arrayManipulation.js
Function:formatArrayStrings
Description: Takes two arrays as arguments: an array of strings and an array of numbers processed by processArray. It modifies each string based on its corresponding number: capitalizes the entire string if the number is even, and converts the string to lowercase if the number is odd.
Task 3: User Profile Creation
File: userInfo.js
Function:createUserProfiles
Description: Takes an array of names and the array of modified names from Task 2. Returns an array of objects, each containing originalName, modifiedName, and id (auto-incremented starting from 1).
Usage
arrayManipulation.js
Contains the functions processArray and formatArrayStrings.
These functions can be imported and used in other files.
userInfo.js
Contains the function createUserProfiles.
This function can be imported and used in other files.