t7249.nim 228 B

12345678910111213141516171819202122
  1. discard """
  2. output: '''
  3. a -> 2
  4. a <- 2
  5. '''
  6. """
  7. import jsffi
  8. var a = JsAssoc[cstring, int]{a: 2}
  9. for z, b in a:
  10. echo z, " -> ", b
  11. proc f =
  12. var a = JsAssoc[cstring, int]{a: 2}
  13. for z, b in a:
  14. echo z, " <- ", b
  15. f()