Category: 04. JAVA SCRIPT
-
What are some of the built-in methods in JavaScript?
Built-in Method Values Date() Returns the present date and time concat() Joins two strings and returns the new string push() Adds an item to an array pop() Removes and also returns the last element of an array round() Rounds of the value to the nearest integer and then returns it length() Returns the length of…
-
How do you create an array in JavaScript?
Here is a very simple way of creating arrays in JavaScript using the array literal: var a = [];
-
How do you create an object in JavaScript?
Since JavaScript is essentially an object-oriented scripting language, it supports and encourages the usage of objects while developing web applications. const student = { name: ‘John’, age: 17 }
-
What are the advantages of JavaScript over other web technologies?
These are the advantages of JavaScript: Enhanced Interaction JavaScript adds interaction to otherwise static web pages and makes them react to users’ inputs. Quick Feedback There is no need for a web page to reload when running JavaScript. For example, form input validation. Rich User Interface JavaScript helps in making the UI of web applications…
-
What are the various data types that exist in JavaScript?
These are the different types of data that JavaScript supports:
-
What’s the difference between JavaScript and Java?
JavaScript Java JavaScript is an object-oriented scripting language. Java is an object-oriented programming language. JavaScript applications are meant to run inside a web browser. Java applications are generally made for use in operating systems and virtual machines. JavaScript does not need compilation before running the application code. Java source code needs a compiler before it…