Console.warn()

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Escreve uma mensagem de alerta no Console Web.

Note: This feature is available in Web Workers.

Nota: No Firefox, warnings têm um pequeno icone de ponto de exclamação perto deles no log do Console Web.

Sintaxe

console.warn(obj1 [, obj2, ..., objN]);
console.warn(msg [, subst1, ..., substN]);

Parâmetros

obj1 ... objN

Uma lista de objetos JavaScript para escrever. A representação String de cada um destes objetos é ligada junto na ordem listada e escrita.

msg

Uma string JavaScript contendo zero ou mais strings de substituição.

subst1 ... substN

Objetos JavaScript com qual as strings de substituição msg serão substituidas. Isto dá um contriole adicional sobre a mensagem que será escrita.

Ver Outputting text to the console na documentação do console para mais detalhes.

Especificações

Specification
Console Standard
# warn

Compatibilidade com navegadores

BCD tables only load in the browser

Ver também