| JavaScript question answers 161-180 | JavaScript question answers 201-220 | |
JavaScript Question Answers - 181-200 |
escape() encodes a string so it can be transmitted safely (deprecated).
unescape() decodes an encoded string (deprecated).
- call(): Invokes a function with a given this value and arguments provided individually.
- apply(): Invokes a function with a given this value and arguments provided as an array.
Use parseInt(string, base). Example: parseInt("1010", 2) → 10.
- Load-time errors
- Run-time errors
- Logical errors
- In browsers: Use File API for reading, and downloads or server APIs for writing.
- In Node.js: Use fs.readFile() and fs.writeFile().
- Primitive types (Number, String, Boolean, Null, Undefined, Symbol, BigInt)
- Reference types (Objects, Arrays, Functions)
arr.unshift(element1, ...) adds elements to the beginning of an array and returns the new length.
throw new Error("message");
date.toDateString()
num.toExponential(fractionDigits)
num.toFixed(x)
date.toISOString()
date.toJSON()
date.toLocaleDateString()
str.toLocaleLowerCase()
date.toLocaleString()
date.toLocaleTimeString()
str.toLocaleUpperCase()
str.toLowerCase()
window.top
| JavaScript question answers 161-180 | JavaScript question answers 201-220 | |