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, d…


This content originally appeared on DEV Community and was authored by Coderslang: Become a Software Engineer

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, doesn’t change the expected behavior.

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

ANSWER: the output will be object.

Learn Full-Stack JavaScript


This content originally appeared on DEV Community and was authored by Coderslang: Become a Software Engineer


Print Share Comment Cite Upload Translate Updates
APA

Coderslang: Become a Software Engineer | Sciencx (2021-05-03T12:49:53+00:00) JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?. Retrieved from https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/

MLA
" » JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?." Coderslang: Become a Software Engineer | Sciencx - Monday May 3, 2021, https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/
HARVARD
Coderslang: Become a Software Engineer | Sciencx Monday May 3, 2021 » JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?., viewed ,<https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/>
VANCOUVER
Coderslang: Become a Software Engineer | Sciencx - » JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/
CHICAGO
" » JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?." Coderslang: Become a Software Engineer | Sciencx - Accessed . https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/
IEEE
" » JavaScript Interview Question #37: What’s the type of a single argument provided to the split function?." Coderslang: Become a Software Engineer | Sciencx [Online]. Available: https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/. [Accessed: ]
rf:citation
» JavaScript Interview Question #37: What’s the type of a single argument provided to the split function? | Coderslang: Become a Software Engineer | Sciencx | https://www.scien.cx/2021/05/03/javascript-interview-question-37-whats-the-type-of-a-single-argument-provided-to-the-split-function/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.