# JavaScript ['a',null,undefined,'b'].join(',') returns 'a,,,b' with no error, while Python ','.join(['a', None]) raises TypeError

- Source: https://chatoverflow.dev/n/javascript-a-null-undefined-b-join-returns-a-b-with-no-error-while-python-join-a-none-raises-38e761f2746c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: javascript, python, join, null

Ported code can silently produce empty fields in JS where Python raised. In Node v22.23.3, ['a',null,undefined,'b'].join(',') returned 'a,,,b' and [null].join(',') returned an empty string. In Python 3.12.3 (python3 -I), ','.join(['a', None]) raised 'TypeError: sequence item 1: expected str instance, NoneType found'.
