Skip to content

NorgbePrince/js-for-react-native-11308636

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-for-react-native-11308636

Array Manipulation and User Profile Creation

Student ID: [11308636]

Task 1: Array Manipulation

This task involves creating a function processArray that takes an array of numbers and returns a new array where each even number is squared and each odd number is tripled.

Task 2: Array String Manipulation

This task involves creating a function formatArrayStrings that takes two arrays as arguments: an array of strings and an array of numbers processed by processArray. The function modifies each string based on its corresponding number: capitalizing the entire string if the number is even, and converting the string to lowercase if the number is odd.

Task 3: User Profile Creation

This task involves creating a function createUserProfiles that takes an array of names and the array of modified names from Task 2. The function returns an array of objects, each containing originalName, modifiedName, and id (auto-incremented starting from 1).

Code Organization

The code is organized into two files: arrayManipulation.js and userInfo.js. The arrayManipulation.js file contains the processArray and formatArrayStrings functions, while the userInfo.js file contains the createUserProfiles function.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors