Prefer to use const and let than var in JavaScript

Created on 13 July 2024, 5 months ago

Problem/Motivation

Variable declaration by var may cause unexpected re-declaration. (ref: example)
Current JavaScript can declare by const or let, which prevent re-declaration.

Proposed resolution

Use const or let.
IE has been dropped support since Drupal 10 so can use const or let.

Remaining tasks

User interface changes

No.

API changes

No.

Data model changes

No.

Release notes snippet

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇯🇵Japan tom konda Kanagawa, Japan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024