May 3, 2021 12:49 pm GMT
Original Link: https://dev.to/coderslang/javascript-interview-question-37-what-s-the-type-of-a-single-argument-provided-to-the-split-function-5fg9
JavaScript Interview Question 37: What's the type of a single argument provided to the split function?
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
.
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:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To