Skip to content

let display can use the const keyword #3

@bobbysebolao

Description

@bobbysebolao

It's great to see that you're using let and const for all of your variable declarations in calculator.js! 💥

One tiny suggestion is to use const to declare the display variable on line 2:

let display = document.getElementById('display');

becomes:

const display = document.getElementById('display');

Because you're never mutating the value of this variable, it remains constant. Using const makes it immediately clear to anyone reading your code that this is an immutable variable.

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