JavaScript: как вывести сообщение в консоль ошибок?
console.error(message); // Outputs an error message to the Web Console console.log(message); // Outputs a message to the Web Console console.warn(message); // Outputs a warning message to the Web Console console.info(message); // Outputs an informational message to the Web Console. In some browsers it shows a small "i" in front of the message.
Вы также можете добавить .js CSS:
console.log('%c My message here', "background: blue; color: white; padding-left:10px;");
Дополнительную информацию javascript-dom можно найти здесь: https://developer.mozilla.org/en-US/docs/Web/API/console
javascript
debugging
2021-12-05T23:00:38+00:00
2022-10-18T00:47:56+00:00
Isacaron
Вопросы с похожей тематикой, как у вопроса:
JavaScript: как вывести сообщение в консоль ошибок?
Предупреждение о файлах Cookies
Мы используем файлы cookies для улучшения работы сайта. Оставаясь на нашем сайте, вы соглашаетесь с условиями использования файлов cookies. Чтобы ознакомиться с нашими Положениями о конфиденциальности и об использовании файлов cookie, нажмите здесь.