This is a Chrome Developer Tools issue. Empty spaces can be repeated, but they are displayed as a single character, which is incorrect:

You can check the result as follows:
(' ' + ' ').length
Here is an example from the Node.js REPL:

In conclusion, your code does work, but the Google Chrome console does not display the result correctly.
If you're talking about displaying in HTML elements that don't have monospace fonts, use the @Jamiec solution using non-breaking spaces :
'[' + '='.repeat (4) + ' '.repeat(4) + ']'
As @James Thorpe, this was a bug in Chrome that was fixed. We will probably fix the fix when updating the browser version.
source share