Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
GBlog
Frontend Developer Roadmap 2024
Frontend development means to design the face of a website or application. It involves working on the appearance of the website. Building interactive buttons, using images...
Read More
dsa | sp javascript string | Question 11
Which method is used to extract a substring from a string based on its position and length? (A)a. substring()(B)b. slice()(C)c. splice()(D)d. substr...
Read More
dsa | sp javascript string | Question 5
Which method is used to remove whitespace from both ends of a string in JavaScript? (A)a. trim()(B)b. strip()(C)c. clean()(D)d. remove() ...
Read More
dsa | sp javascript string | Question 2
Which method is used to concatenate two or more strings in JavaScript? (A)a. append()(B)b. join()(C)c. concat()(D)d. add() A...
Read More
dsa | sp javascript matrix | Question 17
What is the result of the following matrix subtraction?let matrix1 = [[1, 2], [3, 4]];let matrix2 = [[4, 3], [2, 1]];matrix1 - matrix2(A)a) An error will be thrown(B)b) [[...
Read More
dsa | sp javascript matrix | Question 16
How do you find the determinant of a matrix in JavaScript?(A)a) By using the "determinant()" method(B)b) By iterating through each element and calculating the determinant(...
Read More
dsa | sp javascript matrix | Question 11
How do you access the element in the second row and third column of the following matrix?let matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];(A)a) matrix[1, 2](B)b) matrix[2][1...
Read More
dsa | sp javascript matrix | Question 8
What is the output of the following code?[tabby title="Javascript"][sourcecode language="javascript"]const matrix = [[1, 2], [3, 4]];const transpose = matrix[0].map((col, ...
Read More
dsa | sp javascript matrix | Question 2
What is the output of the following code?[tabby title="Javascript"][sourcecode language="javascript"]const matrix = [[1, 2], [3, 4]];const transposed = matrix[0].map((col,...
Read More
dsa | sp javascript string | Question 3
Which method is used to find the index of the first occurrence of a specific character or substring in a string? (A)a. indexOf()(B)b. findIndex()(C)...
Read More
dsa | sp javascript matrix | Question 14
How do you transpose a matrix in JavaScript?(A)a) By using the "transpose()" method(B)b) By iterating through each element and swapping rows and columns(C)c) By using the ...
Read More
dsa | sp javascript matrix | Question 13
What is the result of the following matrix multiplication?let matrix1 = [[1, 2, 3], [4, 5, 6]];let matrix2 = [[7, 8], [9, 10], [11, 12]];matrix1 * matrix2(A)a) An error wi...
Read More
dsa | sp javascript matrix | Question 12
How do you add two matrices in JavaScript?(A)a) By using the "+" operator(B)b) By iterating through each element and adding them together(C)c) Matrices cannot be added in ...
Read More
dsa | sp javascript matrix | Question 9
What is a matrix in JavaScript?(A)a) A data structure that contains a collection of elements arranged in rows and columns(B)b) A type of function that takes in an array as...
Read More
dsa | sp javascript matrix | Question 7
What is the output of the following code?[tabby title="Javascript"][sourcecode language="javascript"]const matrix = [[1, 2], [3, 4]];for(let row of matrix) { console.log(...
Read More
dsa | sp javascript matrix | Question 1
What is the output of the following code?[tabby title="Javascript"][sourcecode language="javascript"]const matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];const rowSum = matrix...
Read More
1
...
3074
3075
3076
...
11375