Skip to content

Commit 49de844

Browse files
committed
Use const
1 parent 5a6db44 commit 49de844

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

add-inputs/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ const toNumber = e => Number(e.target.value)
1313
const renderResult = result => { resultNode.textContent = result }
1414

1515
// x represents the current value of xInput
16-
var x = input(xInput).map(toNumber).startWith(0)
16+
const x = input(xInput).map(toNumber).startWith(0)
1717

1818
// x represents the current value of yInput
19-
var y = input(yInput).map(toNumber).startWith(0)
19+
const y = input(yInput).map(toNumber).startWith(0)
2020

2121
// result is the live current value of adding x and y
22-
var result = combine(add, x, y)
22+
const result = combine(add, x, y)
2323

2424
// Observe the result value by rendering it to the resultNode
2525
result.observe(renderResult)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy