Skip to content

Mingling of var, let, and const #11

@thujone

Description

@thujone

var map, infoWindow, marker;

As you probably have some idea, var is an ES5 keyword meant to be replaced by let and const. Normally you wouldn't see a mingling of both. You might as well replace all the vars with let and const. You'll have to read up some on const, especially surrounding immutability. Generally you want to use const whenever you can, and let when you need to. For example, once a string or an integer is assigned to a const, that value can never change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions