How to determine in javascript whether the string is a question mark?

Hi all. Please tell me how javascript bar a question mark?
const SIGN_IN_POPUP_URL = '/api/sitecore/Account/OneClubRegisterLight?openPopup=true';
March 23rd 20 at 18:51
1 answer
March 23rd 20 at 18:53
SIGN_IN_POPUP_URL.includes('?') // true
But I suspect that you will be interested in reading it.
oldschool option for all IE:
!!~SIGN_IN_POPUP_URL.indexOf('?') // true - Bell_Swi commented on March 23rd 20 at 18:56
Thank you. - Matt_Hand commented on March 23rd 20 at 18:59

Find more questions by tags JavaScript