Given a string str, create a string consisting of all the non-alphabets and non-digits.

JavaScript code