summary refs log tree commit diff stats
path: root/tests/js/t7249.nim
blob: 52eee2f7ca0aa1a8090189dcbc76f92e7fe9d11a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  output: '''
a -> 2
a <- 2
'''
"""

import jsffi

var a = JsAssoc[cstring, int]{a: 2}

for z, b in a:
  echo z, " -> ", b

proc f =
  var a = JsAssoc[cstring, int]{a: 2}

  for z, b in a:
    echo z, " <- ", b

f()