InterviewVault
Welcome back, Sujit Kumar Mishra
Admin
SK Mishra
Revision Mode
Document technical questions and best-practice answers.
Can you tell me some built-in methods in JavaScript?
Some Common Built-in Methods in JavaScript (Easy to Remember):
1: alert() – Shows a popup message.
2: console.log() – Prints messages to the browser console.
3: toUpperCase() – Converts text to uppercase.
4: toLowerCase() – Converts text to lowercase.
5: push() – Adds an item to the end of an array.
6: pop() – Removes the last item from an array.
7: slice() – Returns a part of a string or array.
8: length – Gives the number of items in a string or array.
9: Math.random() – Gives a random number between 0 and 1.
10: parseInt() – Converts a string to an integer number.
These methods help you work with text, numbers, and arrays easily in JavaScript!