chris-pearce / chris-pearce/javascript-calculator

Better initiate `createOutputScreen()`

Open
#18 0 comments 0 reactions 1 assignee Claimed by @chris-pearce View on GitHub
enhancement
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Right now we have to have all constants come before the `DOM` constant otherwise the `createOutputScreen()` function can't access any of them, and it does access one of them: `NUMBER_BUTTON_TEXT_NODES.zero.display`.

So the initialisation of this function should be done better, currently in `constants.js`:

``` js
import createOutputScreen from './createOutputScreen';

export const DOM = {
root: document.getElementById('calculator'),
outputScreen: createOutputScreen()
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.