If you use an android tablet or phone then you need to install a good file manager like:
- MT manager
- File manager+
Lastly and most importantly, you must have a basic knowledge of HTML.
A code editor is a software that a programmer uses to write programming instructions (scripts in this case). There are basically two types of code editors you can choose from; Integrated Development Environment (IDE) and lightweight code editors.
Integrated Development Environment (IDE)
An IDE is a powerful code editor with many features especially design for working on a “whole project”. Its a full “development environment”. An IDE usually provides code autocompletion based on the project and also on the programming language syntax, a debugging environment for testing the code and other project-related tools. If you are going to use an IDE, I am not going to choose a good IDE for you because the goodness of an IDE depends on a combination of personal opinion, affordability, operating system enviroment. However here are some IDEs you can choose from;
The IDEs mentioned above are all cross-platform.
Lightweight code editors
“Lightweight code editors” are not as powerful as IDEs. However they are fast, and simple to use. Unlike IDEs, “lightweight code editors” are used only to open and edit code files.
Here are some code editors you can choose from:
Web Development environments on Android
If for any reason you have no access to a PC, don’t lose heart, there are a lot of code editors and IDEs in playstore that run on Android.
Here are some you can choose from:
In browser developer console we use the
console.log() function mostly for debugging purposes. The function outputs messages to the console screen.
To open “developer console” on Chrome press
In console, type the following:
In the example above,
console.log() function prints “Hello!” to the console (and then prints
console.log() has no return value
With the help of the
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <h1> Welcome to my webpage </h1> <script> alert('Hello, champion!'); </script> </body> </html>
As you can see in the example above we used the
alert on the webpage.
For example, you can open your code editor and create a file named something like myScript.js then add the following code in the file:
alert("Hello from the other side");
src attribute of
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <h1> Welcome to my webpage </h1> <script src ="myScript.js"> </script> </body> </html>
Make sure the two files are in the same folder and then run the HTML file.
You can even use a full url as the
<script src="myGame.js"></script> <script src="logic.js"></script> …
src is set, the script content in the tag will be ignored.”
<script src = "myCode.js"> alert("hi"); // This content will be ignored, because src is set </script>