let protocol; let url = 'https://javascript.ru/forum'; url.charAt(4) === 's' ? protocol = 'https' : protocol = 'http';