0

How can I print in the console, native properties and methods? Like for example, I have an array and I want to know all native functions like: sort(), shift(), pop()... etc, without need to research the JS library. And the console must return these methods.

1
  • Are you asking how to see all array methods or all native functions in general? Do you also want web API functions etc...? Commented Mar 30, 2020 at 12:18

2 Answers 2

1

Yes, you can press F12, go to console and type in for example console.log(Array.prototype)

Same you can do with String, Object, Number

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

There is any way? without need to attach the js code to a HTML file? Because I like to study js files only, running in the shell attaching in package,json using yarn start
you want only to use js without the need of an html file and browser? then just install node.js on your computer. after you installed it , i would strongly recommend, to use visual studio code. then you open some folder, create an file for example test.js and then you open the terminal, or with the key CTRL + SHIFT + Ö in my case then you can simply write node test.js and it will run your js code in a shell
I hope you mean something like this: code.visualstudio.com/docs/nodejs/nodejs-tutorial but first you will need to install node.js from nodejs.org/en
1

Array.prototype have all the information.

console.log(Array.prototype); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.