Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 3, 2021 12:49 pm GMT

JavaScript Interview Question 37: What's the type of a single argument provided to the split function?

js-test-37

What's the output?

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

In this code snipped, all the arguments provided to the function split will be collected and placed in a single array args.

The fact that we provide a single argument hello, doesnt change the expected behavior.

As all arrays are objects in JavaScript, well see the string object printed to the console.

ANSWER: the output will be object.

Learn Full-Stack JavaScript


Original Link: https://dev.to/coderslang/javascript-interview-question-37-what-s-the-type-of-a-single-argument-provided-to-the-split-function-5fg9

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To