DEV Community

Discussion on: Similar functions in JavaScript and Python

Collapse
 
lyfolos profile image
Muhammed H. Alkan • Edited

I want to be sure but don't think I'm saying you're not good: Do you have any good knowledge with Python or Functional Programming? The wrong parts are

  • Params is shortened version of "Parameters" and you just did get only one parameter.

  • PEP8 - Function names should be lowercase, with words separated by underscores as necessary to improve readability. ("funcName" to "func_name")

  • What are [ comment ]? You just have to use comments! // for JS, # for Python.

  • Why adding space between lambda and map function? (map( lambda x: x * 2, nums))

  • Dude its not ▇▇▇▇▇▇▇ lambda function, its just lambda (anonymous function)!

  • JS and Python lambdas have no any similarities, in my opinion, even Java has more similar lambdas to JS. If you're meaning the feature that lambdas give you, almost every modern haves this feature.

  • Almost every languages map, filter, reduce is similar.

Collapse
 
moz5691 profile image
Chan Ho Ahn

I am very appreciated of your comment. Read some of your post. You seem to have good understanding of functional programming. Following your comment, have made some corrections. Thank you. :)

Collapse
 
lyfolos profile image
Muhammed H. Alkan

No problem!