JavaScript is a scripting language that can be used to add data and actions to web pages. It can also be used in other applications that don’t run on a web browser, such as PDF documents and desktop widgets.
What is a Script?
Scripts are programs that automate actions and tasks, such as responding to user clicks, displaying messages, or validating user input. They can be added to HTML pages using script> tags and triggered by events that occur when a browser or user interacts with the page.
What is a JavaScript program?
A JavaScript program consists of an Abstract Syntax Tree (AST) and a Machine Runtime Engine. The AST is a collection of strings and other information about the code, which is parsed by the JavaScript engine before the code is submitted for execution. The engine then runs the JavaScript code and produces an output in a format that is compatible with the browser’s display system.
What is a function?
A function is a group of steps that perform an operation on a data type. It can include operations such as addition, subtraction, multiplication, and division. It can also manipulate objects, such as strings and arrays.
What is a method?
A method is a set of instructions that can be followed to perform an action. It can include operations such as adding, subtracting, and comparing values. It can also manipulate objects, such as combining strings and arraigning values.
What is a higher-order function?
A higher-order function is a function that takes one or more functions as arguments and returns a function as a result. It can be used to perform actions such as mapping, filtering, reduction, and zipping.
What is the difference between a primitive and non-primitive object?
A primitive object is an immutable, or fixed-point, data type. It cannot be changed once created. A non-primitive object, on the other hand, can be changed at any time.
What is the difference between ‘function’ and’method’?
A function is an algorithm that combines a set of steps into a single step. It can be used to do a wide variety of things, from displaying numbers and strings to performing complex mathematical operations on a group of local properties and parameters.
What is the difference between , >, ‘=’ and ‘:’?
A ‘=’ or ‘:’ comparison is the most common type of comparison in JavaScript. It compares two objects to see if they are equal. Other comparisons include ”, ‘>’ and ‘:’ which are used for ‘less than’, ‘greater than’ and ‘or’ comparisons.
What is a string?
A string is a data type that stores a single piece of text. A string is usually displayed on a web page, but can be used in other programming languages as well.
What is a date and time?
A date and time object is a data type that stores the current date and time. It can be accessed with the methods getDate(), getDay(), getHours(), getFullYear(), getMinutes(), and getTime().