Sort Score
Result 10 results
Languages All
Labels All
Results 541 - 550 of 23,249 for

js

(0.32 sec)
  1. IdentityCredential - Web APIs | MDN

    Learn about the IdentityCredential interface, including its properties, code examples, specifications, and browser compatibility....request would look like this: js async function signIn() { const...IdentityCredential.token value, for example: js console.log(identityCredential...

    developer.mozilla.org/en-US/docs/Web/API/Identi...
  2. SyntaxError - JavaScript | MDN

    The SyntaxError object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code....Examples Catching a SyntaxError js try { eval("hoo bar"); } catch...error } Creating a SyntaxError js try { throw new SyntaxError("Hello");...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  3. HTMLElement: load event - Web APIs | MDN

    Learn about the load event, including its type and syntax, code examples, specifications, and browser compatibility.... js elt.addEventListener("load",...ad</button></div> JavaScript js const image = document.getElementById("image");...

    developer.mozilla.org/en-US/docs/Web/API/HTMLEl...
  4. SyntaxError: property name __proto__ appears mo...

    The JavaScript exception "property name __proto__ appears more than once in object literal" occurs when an object literal contains multiple occurrences of the __proto__ field, which is used to set the prototype of this new object.... Examples Invalid cases js const obj = { __proto__: {},...__proto__: { a: 1 } }; Valid cases js // Only setting the prototype...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  5. WeakMap - JavaScript | MDN

    A WeakMap is a collection of key/value pairs whose keys must be objects or non-registered symbols, with values of any arbitrary JavaScript type, and which does not create strong references to its keys. That is, an object's presence as a key in a WeakMap does not prevent the object from being garbage collected. Once an object used as a key has been collected, its corresponding values in any WeakMap become candidates for garbage collection as well — as long as they aren't strongly referred to elsewhere. The only primitive type that can be used as a WeakMap key is symbol — more specifically, non-registered symbols — because non-registered symbols are guaranteed to be unique and cannot be re-created.... Examples Using WeakMap js const wm1 = new WeakMap(); const...class with a .clear() method js class ClearableWeakMap { #wm;...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  6. Third-party APIs - Learn web development | MDN

    This article has given you a useful introduction to using third-party APIs to add functionality to your websites.... For example: js const audioCtx = new AudioContext();...mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js" defer></script> <link...

    developer.mozilla.org/en-US/docs/Learn/JavaScri...
  7. Intl.DateTimeFormat - JavaScript | MDN

    The Intl.DateTimeFormat object enables language-sensitive date and time formatting.... js const date = new Date(Date.UTC(2012...languages) using the locales argument: js const date = new Date(Date.UTC(2012...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  8. SyntaxError: invalid identity escape in regular...

    The JavaScript exception "invalid identity escape in regular expression" occurs when a Unicode-aware regular expression pattern contains an escape sequence that does not represent a recognized escape sequence....Invalid cases js /[\f\v\n\t\ ]/u; Valid cases js // There's no...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  9. TypeError: calling a builtin X constructor with...

    The JavaScript exception "calling a builtin X constructor without new is forbidden" occurs when you try to call a builtin constructor without using the new keyword. All modern constructors, such as Promise and Map, must be called with new.... Examples Invalid cases js const m = Map(); // TypeError:...new is forbidden Valid cases js const m = new Map(); See also...

    developer.mozilla.org/en-US/docs/Web/JavaScript...
  10. SyntaxError: redeclaration of formal parameter ...

    The JavaScript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.... js function f(arg) { let arg = "foo";...the function parameter already. js function f(arg) { arg = "foo";...

    developer.mozilla.org/en-US/docs/Web/JavaScript...