Inspectopedia
 
2024.3

'map.put()' can be converted to assignment

Info
New
Last modified: 03 December 2024

Reports map.put function calls that can be replaced with indexing operator ([]).

Using syntactic sugar makes your code simpler.

The quick-fix replaces put call with the assignment.

Example:

After the quick-fix is applied: