Skip to content

Conversation

@Frax404NF
Copy link
Owner

introduces several new JavaScript examples demonstrating modern function features, including arrow functions, default parameters, rest parameters, and callback functions. The changes focus on teaching best practices and usage patterns for these features through practical code challenges and sample implementations.

Arrow Functions and Refactoring

  • Refactored the speedWarning function to use two parameters (speed limit and actual speed) and only warn drivers exceeding the limit in challange.js.
  • Provided multiple examples of arrow function syntax and parameter usage in index.js and function-expression/index.js, including single-parameter, multi-parameter, and conditional logic cases. [1] [2]

Array Methods and Inline Functions

  • Demonstrated use of inline arrow functions with array methods like .map() to convert miles to kilometers in a concise format in inline-arrow-function/index.js.
  • Added a challenge using .reduce() with an inline arrow function to calculate total cost from an array of item objects in challange-1/index.js and provided a sample items array in itemsBoughtArr.js. [1] [2]

Default Parameters

  • Implemented a function utilizing default parameters for discounts when calculating total cost, and imported an array of items in default-params/index.js.

Rest Parameters and Dynamic Arguments

  • Added examples using rest parameters to handle variable numbers of arguments for permission levels and generating gift labels, including HTML/CSS/JS for rendering personalized labels in the browser. [1] [2] [3] [4]

Callback Functions

  • Illustrated callback function usage by passing notification functions as arguments, with quiz comments listing common use cases in callback-function/index.js.

@Frax404NF Frax404NF self-assigned this Dec 1, 2025
…r-challange (real-estate)learned to transform arrays of data into dynamic UIs using\ modern JavaScript patterns for function and params
Repository owner deleted a comment from Copilot AI Dec 1, 2025
@Frax404NF Frax404NF merged commit d4f8bcc into master Dec 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants