“instancia de” Respostas de código

instancia de

let result = chars instanceof Set;
console.log(result);
Code language: JavaScript (javascript)
Elated Eland

JS instanceof

let literalString = 'This is a literal string';
let stringObject  = new String('String created with constructor');

literalString instanceof String;  // false, string primitive is not a String
stringObject  instanceof String;  // true

literalString instanceof Object;  // false, string primitive is not an Object
stringObject  instanceof Object;  // true

stringObject  instanceof Date;    // false
2589

Respostas semelhantes a “instancia de”

Procure respostas de código populares por idioma

Procurar outros idiomas de código