Found 9150 Articles for Object Oriented Programming

What is Babel, and how will it help you write JavaScript?

Ayush Gupta
Updated on 27-Nov-2019 09:53:30

382 Views

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backward-compatible version of JavaScript in current and older browsers or environments. Babel's plugins allow you to use the new syntax, right now without waiting for browser support.The main reasons to use babel JS are −Syntax transformation(Latest JS syntax to backward-compatible syntax.)Polyfill features that are missing in your target environment (through @babel/polyfill)Source code transformations (code modes)

Why do I need Babel JS?

Ayush Gupta
Updated on 27-Nov-2019 09:51:53

744 Views

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backward-compatible version of JavaScript in current and older browsers or environments. Babel's plugins allow you to use the new syntax, right now without waiting for browser support.The main reasons to use babel JS are −Syntax transformation(Latest JS syntax to backward-compatible syntax.)Polyfill features that are missing in your target environment (through @babel/polyfill)Source code transformations (code modes)

Write the dependencies of backbone.js in javascript?

Ayush Gupta
Updated on 27-Nov-2019 09:50:24

222 Views

The only hard dependency(without which backbone js won't work at all) is Underscore.js. Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.There are other dependencies required as you proceed to use more advanced features of backbone.js. For example,Libraries for RESTful persistence(Backbone.sync)History support via Backbone.RouterDOM manipulation with Backbone.View or Jquery

What is the architecture of backbone.js in javascript?

Ayush Gupta
Updated on 27-Nov-2019 09:48:50

185 Views

The BackboneJS gives a structure to the web applications that allows separating business logic and user interface logic.The architecture of BackboneJS contains the following modules -HTTP RequestThe HTTP client sends an HTTP request to a server in the form of a request message where web browsers, search engines, etc., acts like HTTP clients. The user requests for a file such as documents, images, etc., using the HTTP request protocol.RouterIt is used for routing the client-side applications and connects them to actions and events using URLs. It is a URL representation of the application's objects. This URL is changed manually by ... Read More

What is the use of backbone.js in structuring javascript?

Ayush Gupta
Updated on 27-Nov-2019 09:46:41

111 Views

Backbone is an MVC framework for the frontend. With Backbone, you represent data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a "change" event; all the Views that display the model's state can be notified of the change so that they are able to respond accordingly, re-rendering themselves with the new information.Backbone gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions views with declarative event handling, and ... Read More

What is JSlint error "missing radix parameter" in JavaScript?

Ayush Gupta
Updated on 27-Nov-2019 09:43:07

1K+ Views

The parseInt function available in JavaScript has the following signature −parseInt(string, radix);Where the parameters are the following −string − The value to parse. If this argument is not a string, then it is converted to one using the ToString method. Leading whitespace in this argument is ignored.radix − An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the string.If the radix parameter is omitted, JavaScript assumes the following −If the string begins with "0x", the radix is 16 (hexadecimal)If the string begins with "0", the radix is 8 (octal). This feature is ... Read More

What is the difference between `new Object()` and object literal notation in JavaScript?

Ayush Gupta
Updated on 27-Nov-2019 09:41:34

633 Views

Both new Object() notation and Object literal({}) notations do the same thing. They initialize an object. However, the second notation can be a little different if you start adding properties to it.Examplelet a = {    name: 'Ayush' }This initialization is equivalent to −let a = new Object(); a.name = 'Ayush'orlet a = {} a.name = 'Ayush'

Differences between Difference between getc(), getchar(), getch() and getche() functions

Mahesh Parahar
Updated on 26-Nov-2019 10:42:58

1K+ Views

All of these functions are used to get character from input and each function returns an integer signifying the status code as well.Following are the important differences between getc(), getchar(), getch() and getche() functions.getc()getc() can read characters from any stream. Returns EOF on failure.Syntaxint getc(FILE *stream);getchar()getchar() can read characters from standard input only.Syntaxint getchar();getch()getch() can read characters from standard input but it does not use any buffer and returns immidately without waiting for enter key pressed.Syntaxint getch();getche()getche() behaves similar to getch() as it can read characters from standard input and it does not use any buffer and returns immidately without ... Read More

Differences between Interface and class in Java

Mahesh Parahar
Updated on 07-Dec-2023 11:54:40

25K+ Views

Class A class is a blueprint from which individual objects are created. A class can contain any of the following variable types. Local Variables − Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed when the method has completed. Instance Variables − Instance variables are variables within a class but outside any method. These variables are initialized when the class is instantiated. Instance variables can be accessed from inside any method, constructor or blocks of that particular class. Class Variables − Class variables are variables declared ... Read More

Difference between Constructors and Methods in Java

Mahesh Parahar
Updated on 16-Apr-2025 15:54:49

21K+ Views

Constructors are special methods used to initialize objects, whereas methods are used to execute certain statements. Constructors and methods are both blocks of code inside a class, but they have different purposes. In this article we will learn about the main differences between a constructor and a method. What is a Constructor in Java? A constructor is a special method in Java that is automatically called when an object is instantiated. Constructors have the same name as the class and do not have a return type. Its main purpose is to set initial values to the newly created object. ... Read More

Advertisements