Why boolean parameters make code harder to read (and what to use instead)
createUser(user, true, false) works. It's also surprisingly hard to read. Here's why I've stopped writing APIs like this in JavaScript.
Read the full articleYou might also wanna read
JavaScript Conditional Statements: A Practical Guide to All Key Types
JavaScript offers several conditional statement types to control program flow based on logical conditions. The basic if, if...else, and if..
Getting a URL Parameter in Javascript
When programming in Javascript there are times when you might want to know if there were any parameters passed through the URL. In case you
JavaScript Data Types: Numbers, Strings, Booleans
The core JavaScript data types (number, string, boolean, null, undefined) and how typeof works, explained with live runnable examples.

From named-parameters to Domain-Specific Languages
There have always been a few irritating things to me in Java. However, working on Groovy made me go beyond these limitations, or all the use
JavaScript Functions: Parameters and Return Values
Define and call JavaScript functions: parameters, return values, default parameters, and why functions are the heart of the language.

Groovy default params to avoid one-argument methods being called without params
Recently, I saw an interesting tweet , mentioning a JavaScript trick using default parameters to make a parameter mandatory. In a language l

Comments
Sign in to join the conversation.
No comments yet. Be the first.