This article describes the method of assigning JavaScript function parameters in a method with parameter names. Share it for your reference. The specific analysis is as follows:
This is actually when passing parameters to a function, you can use the parameter name: parameter value to pass it, so that there will be no errors in passing. However, the following code is implemented through dictionaries, unlike Python that supports such methods in its original form
function foo({ name:name, project:project}) { Print( project ); Print( name );}Calling methods
foo({ name:'sooubok', project:'jslibs' })foo({ project:'jslibs', name:'sooubok'})I hope this article will be helpful to everyone's JavaScript programming.