Aryan PrajapatKnowledge Contributor
How do you create self string using special characters
How do you create self string using special characters
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
The self string can be formed with the combination of []()!+ characters. You need to remember the below conventions to achieve this pattern.
Since Arrays are truthful values, negating the arrays will produce false: ![] === false
As per JavaScript coercion rules, the addition of arrays together will toString them: [] + [] === “”
Prepend an array with + operator will convert an array to false, the negation will make it true and finally converting the result will produce value ‘1’: +(!(+[])) === 1