<> ~ ==! !== function addTax(total) { return total * 1.05; }
addTax = 50; return addTax 50; addTax(50); addTax 50; let rate = 100; let 100 = rate; 100 = let rate; rate = 100; var student = new Person(); var student = construct Person; var student = Person(); var student = construct Person(); let modal = document.querySelector('#result'); setTimeout(function () { modal.classList.remove('hidden'); }, 10000); console.log('Results shown');
10000 सेकंड बाद
class Animal { static belly = []; eat() { Animal.belly.push('food'); } } let a = new Animal(); a.eat(); console.log(/* Snippet Here */); //Prints food
a.prototype.belly[0] Object.getPrototype0f (a).belly[0] Animal.belly[0] a.belly[0] A for (var i = 1; i <= 4; i++) { setTimeout(function () { console.log(i); }, i * 10000); }
B for (var i = 1; i <= 4; i++) {
(function (i) {
setTimeout(function () {
console.log(j);
}, j * 1000);
})(j);
}
C for (var i = 1; i <= 4; i++) { setTimeout(function () { console.log(i); }, i * 1000); }
D for (var i = 1; i <= 4; i++) {
(function (j) {
setTimeout(function () {
console.log(j);
}, j * 1000);
})(i);
}
E for (var j = 1; j <= 4; j++) {
setTimeout(function () {
console.log(j);
}, j * 1000);
}
A let discountPrice = function (price) { return price * 0.85; };
B let discountPrice(price) {
return price * 0.85;
};
C let function = discountPrice(price) { return price * 0.85; };
D discountPrice = function (price) { return price * 0.85; };
var Storm = function () {};
Storm.prototype.precip = 'rain';
var WinterStorm = function () {};
WinterStorm.prototype = new Storm();
WinterStorm.prototype.precip = 'snow';
var bob = new WinterStorm();
console.log(bob.precip);
[ ] Storm()
/[0-9]{2,}:[0-9]{2,}:[0-9]{2,}/ /\d\d:\d\d:\d\d/ /[0-9]+:[0-9]+:[0-9]+/ / : : / नोट: पहले तीन अंश वास्तव में सही हैं और ये अंश अंकों को मिलाते हैं, लेकिन दूसरा विकल्प सबसे सही है क्योंकि यह केवल 2 अंकी समय मान (12:00:32) को मिलेगा। पहला विकल्प काम कर जाता अगर पुनः प्रक्षेपण श्रेणी ऐसा दिखता [0-9]{2}, हालांकि अंक में अविराम के कारण [0-9]{2,}वह 2 या अधिक अंक (120:000:321) का चयन करेगा। तीसरा विकल्प किसी भी समय समय अंक की श्रेणी जोड़ता है, एकल और बहुमुखी (यानी 1:2:3 भी मिल सकता है)।
और अधिक संसाधन:
'use strict';
function logThis() {
this.desc = 'logger';
console.log(this);
}
new logThis();
undefined window {desc: "logger"} function let roadTypes = ['street', 'road', 'avenue', 'circle'];
console.log(typeof 42);
'float' 'value' 'number' 'integer' self object target source function addNumbers(x, y) {
if (isNaN(x) || isNaN(y)) {
}
}
exception('One or both parameters are not numbers') ('One or both parameters are not numbers')`
throw 'One or both parameters are not numbers' throw new Error('One or both parameters are not numbers')