Wednesday, September 21, 2022

Features of the JS language

 Features of the JS language



The main features of this programming language are:


Dynamic typing. That is, the data type will only be determined when a variable or const is assigned its value.


Flexible work with functions. In JS, you can not only execute functions, but also return functions from functions, pass functions as parameters to other functions, and assign functions as the value of variables.


JavaScript is supported by all modern browsers.


Object-oriented programming. That is, it is such a programming methodology in which the entire program is represented as a set of objects.


In addition, an important feature of JavaScript is its developed infrastructure. Today, developers can work with a large number of libraries and frameworks (the most popular of them are React, Angular and Vue), several builders, auxiliary libraries (for example, Lodash), and static site generators.


As for the scope, first of all, the JavaScript language is widely used in web development. And it works in combination with HTML and CSS. Using JS, you can create any browser applications. For example, the loan calculator you see on most bank websites is also built using JavaScript.


Moreover, the entire visual part of this calculator is a combination of HTML + CSS. That is, buttons, charts, sliders are static elements. With the help of JS, everything is animated, and all basic calculations are also carried out.


Another example is a subscription or registration form. It was created in HTML+CSS. However, interaction with the server is provided precisely thanks to JS. In addition, JavaScript can be used to create the following programs and applications:


Mobile software development (using React Native).


Developing server-side solutions with Node.js.


Creation of desktop applications. JS is used, for example, in applications created by Adobe.


Programming of household appliances and payment terminals.

A bit of Javascript history



 The JavaScript programming language is quite popular today. This is due to the fact that it can be used both to create dynamic static web pages, and to write full-fledged SPA applications and even computer games. True, the latter is less common today due to the fact that games are written in other languages.

A bit of history

The first prerequisites for the appearance of this language appeared in 1992, when the development of the scripting embedded language Cmm (C minus minus) was started. It was later renamed ScriptEase because the name C minus minus had a negative connotation. Generally. Before the language acquired its modern name, its name changed several more times.


In 1995, Brendan Eich was given the task of introducing a programming language into the Netscape browser. The language was originally called Mocha, then LiveScript. Finally, it got its modern name - JavaScript. Here the developers went to the trick. At the time when they were improving LiveScript, the Java language was quite popular. In order to attract more developers to work with the new language, it was decided to use Java in its name. The end result is JavaScript.


The latest version of the ES6 language was released in 2015. With its appearance, the language gained a second life. There are new standards, as well as the ability to work with constants. The code itself has also changed. The language adheres to the principle of reducing code with more functionality.

Thursday, August 5, 2021

How do I use react templates?

 How do I use react templates?





1. Introduction.


Designing a React Native application from scratch can be a very uncomfortable process, especially if we talk about design since it has to be planted for Android or IOS devices. Also, you must make sure that your application is in the best condition regardless of the size of the screen to look at.


This is where we come to the usefulness of templates. They manage that design, start for you, so that the app is seen in the best conditions and that they do not make any kind of effort for you. We have different types of templates within the stores and that should be used for all types of web pages.


So, we are going to use this tutorial to make a good web page for React Native.


2- Get a template from the store.


You can download the template at any store, although you will have to pay. But it is worth doing this investment since it will be better if we have a paid template than a free one. now you will have to configure the template and customize it to your liking. The characteristics of these React templates are the following:


- Full integration of WooCommerce: if you manage a website of this type, the application can show those products.


- Support for IOS and android: that is seen in this type of operative system.


- Social logins: customers will be able to log in with their social media accounts such as Facebook.


- Simple customization: broken down into components.


- Push Notifications: this alerts us that there is an update to the status of the specific order.


- Multilanguage support: the main language is English, but you can use the language you want.


- Secure payment integration: payments made by PayPal.


3- Project configuration.


When we have the template purchased, you will have the download link for the file, something that you will have to download.


You will open a new window and run the NPN Install command.


Thus, we will install everything that has to do with the project. Once we have done all this, there is an additional asp for the IOS operating system, you will now run pod install.


For android you must connect any device to the computer and execute the Ads Devices command, this will make all the available devices appear.


We will run the application on an Android device. React Native run-Android. For IOS, you will only have to change Android to IOS.


Now we'll have everything done.


4- Conclusion.


In conclusion, React templates are a good option so that any web page related to any business can function correctly and in the best possible conditions. There is a problem that is paid, it is true that to be able to get everything you must pay a considerable amount, but without a doubt, it is worth it, since you may have certain characteristics that the free ones lack. These features have to do with push notifications, which can work with two operating systems such as Android and IOS, along with the option of being able to customize everything to the maximum. you will also be able to work with several languages such as English in the first place or Vetnmina among other options.


FROM this way you can have everything correct on your website.

Thursday, May 20, 2021

Javascript runs before HTML even if at end of body

 My javascript is running before my HTML loads, even if I put it right before the like this:

<body>
    <h1>Title</h1>
    <script>
        alert("yo");
    </script>
</body>

Any ideas why that may be happening?


learn javascript

Functional switch statement in Javascript

Say I have a switch statement that takes a variable myData between 1 and some larger value, i.e. 300.


Depending on the "status code" variable, the result is the text value of another variable. For example, if myData == 1, I want to return the a variable called code1. If myData == 300, I want to return the a variable called code300. Code1 and code300 variables store unrelated strings, i.e. "This is a summary", or "This is a note". Some psuedo-code below:


var myData = statusCode;


var code1 = "This is a summary";

var code300 = "This is a note";


switch(myData) {

    case statusCode:

        scriptletResult = returnCode("code", statusCode); // code1 if myData == 1

        break;          

    default:

        scriptletResult = code1;

}


function returnCode(code, statusCode) {

    return code + statusCode; // Returns a variable "code1" if statusCode == 1

}

How can I get this to work?

What is JavaScript?

 

What is JavaScript?

JavaScript may be a language of programming that's liable for providing more interactivity and dynamism to sites . When JavaScript runs within the browser, you don’t got to use a compiler. The browser reads the code directly, without the necessity for third parties. Therefore, it's recognized together of the three mother tongues of the online along side HTML (content and its structure) and CSS (content design and its structure).

Now, JavaScript isn't an equivalent as Java, which may be a very different programing language . The confusion comes from the name, registered by an equivalent company that created Java (Sun Microsystems). JavaScript (JS) was created later, and what the North American company did was simply change the name that its creators had given it when buying the project. The Java programing language has been focused on far more than simply the online since its inception.


read full article here


Features of the JS language

 Features of the JS language The main features of this programming language are: Dynamic typing. That is, the data type will only be determi...