-4

i want to show messages using java script for testing my code that it is working or not

if(true){
////show message 

} how i can do this using java script and how many ways are there to show messages using java script. Because i want to do logging using java script if my code is working or not

Engineer
  • 1,436
  • 3
  • 18
  • 33

2 Answers2

1

try alert in javascript...

if(true)
{
    alert("Message");
}

In the case of console..

console.log("Hello World!");
Jameem
  • 1,840
  • 3
  • 15
  • 26
1

Are you referring to alert?

if(true)
{
   alert("hello world!");
}

or if in console

if(true)
{
   console.log("Hello World!");
}
Joakim M
  • 1,793
  • 2
  • 14
  • 29