0% found this document useful (0 votes)
3 views1 page

Day 1 Lab

The document outlines a JavaScript lab exercise that involves defining an array of numbers, sorting and filtering them, and displaying the maximum and minimum values. It also requires creating a function that performs operations on a variable number of integers and constructing an anonymous object with user-defined properties. The exercise emphasizes the use of modern JavaScript features such as arrow functions, the spread operator, and template literals.

Uploaded by

Karim Elmlegy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Day 1 Lab

The document outlines a JavaScript lab exercise that involves defining an array of numbers, sorting and filtering them, and displaying the maximum and minimum values. It also requires creating a function that performs operations on a variable number of integers and constructing an anonymous object with user-defined properties. The exercise emphasizes the use of modern JavaScript features such as arrow functions, the spread operator, and template literals.

Uploaded by

Karim Elmlegy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ECMAScript Lab1

1- Define an array of numbers (only let is allowed)

Sort them ascending then descending (using array sort method and Arrow
functions)

Filter numbers larger than 50 (using array filter method and Arrow functions)

Display Max and Min Numbers (using math methods and spread operator)

2- Define javascript function that takes only 2 arguments operator and any
numbers of integers (using Rest operator) then display the result of operation on
console on one line (using substitution $ with bactecks ` ) as follow
“result of sum operation for 3,1,6,3 is 13”

3- Create constant project anonymouse object after takeing properties names


and values from user (using object literals )
Note: names are projectId , projectName ,duration and printData which
[Link] all project data

Finally: try all lecture code

You might also like