• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to pass specified parameters in Javascript

Resolved: How to pass specified parameters in Javascript

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I would like to pass value to specified parameters and use default value by optional parameters for the rest.
A sample is made as below.
Current result is ‘b23’.
But I would like to obtain the result of ‘1b3’.
I also try to run test({b:'b'}) and test({b:='b'}), resulting SyntaxError.
Thank you for your help.

Answer:

The syntax is slightly different:

If you have better answer, please add a comment about this, thank you!

javascript optional parameters
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.