Channel Avatar

selva tutorials @UCKRu7_iNlR7-IKAYkoTOW7A@youtube.com

8K subscribers - no pronouns :c

This channel is all about HTML5, CSS3, BootStrap, JavaScri


Welcoem to posts!!

in the future - u will be able to do some more stuff here,,,!! like pat catgirl- i mean um yeah... for now u can only see others's posts :c

selva tutorials
Posted 2 years ago

What will be the output of the following JavaScript code ?

Array.prototype.num = [1,2,3,4,5]
class Num extends Array{
constructor(){
super()
}
}
const num = new Num()
console.log(num.num.length)

9 - 1

selva tutorials
Posted 2 years ago

What will be the output of the following JavaScript code ?

const arr = [,]
console.log(arr.length)

7 - 3

selva tutorials
Posted 2 years ago

How many times the toString() will be called ?

const person = {
name : 'abc',
toString(){
console.log(`To string method is called`)
}
}
const greet = {}
greet[person] = 'Welcome'
console.log(greet[person])

8 - 1

selva tutorials
Posted 2 years ago

What will be the output of the following JavaScript code ?

class User{
constructor(name){
this.username = [...name]
}
}
const user = new User("abc")
console.log(user.username)

7 - 3

selva tutorials
Posted 2 years ago

What will be the output of the following JavaScript code ?

const fruits = ['Lemons','Limes','Oranges']
fruits.length = 0
console.log(fruits["1"])

3 - 2

selva tutorials
Posted 2 years ago

What will be the output of the following JavaScript code ?

Greet()
var Greet = () => `Welcome`

8 - 3

selva tutorials
Posted 3 years ago

What will be the output of the following JavaScript code ?

function add(a,b,c){
return a+b+c
}
function add(a,b){
return a+b
}
console.log(add(1,2,3))

7 - 6

selva tutorials
Posted 3 years ago

What will be the output of the following JavaScript code ?

const sum = arr => arr.length === 1 ? arr[0] : arr.pop() + sum(arr)
console.log(sum([10,20,30]))

11 - 3

selva tutorials
Posted 3 years ago

What will be the output of the following JavaScript code ?

class Cars{
constructor(name,price){
this.name = name
this.price = this.Currencyformat(price)
}
Currencyformat(amt) {
return new Intl.NumberFormat('en-IN', { style: 'currency', currency: 'INR' }).format(amt)
}
get getDetails(){
return `Car Name = ${this.name} , Price = ${this.price}`
}
}
const car1 = new Cars('Audi','100000')
console.log(Car1.getDetails)

8 - 2

selva tutorials
Posted 3 years ago

What will be the output of the following JavaScript code ?

console.log(4>5<10>5<-10>-50)

5 - 2