- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arguments object is the arguments passed to a function. It is a variable accessible for all functions. Let’s say two arguments are passed to a function, then you can access them like the following:
The following code shows how to implement type of operator
<html> <body> <script> var a = 20; var b = "String"; var linebreak = "<br />"; result = (typeof b == "string" ? "B is String" : "B is Numeric"); document.write("Result => "); document.write(result); document.write(linebreak); result = (typeof a == "string" ? "A is String" : "A is Numeric"); document.write("Result => "); document.write(result); document.write(linebreak); </script> </body> </html>
Let’s say you have two arguments, then with typeof, you can refer them like the following, which will return the typeof arguments.
document.write(typeof arguments); document.write(typeof arguments);
- How to use typeof () in Android sqlite?
- How to use jQuery.slice() method with no arguments?
- How to use variable-length arguments in a function in Python?