Monday, February 26, 2018

Javascript : Confirmation

document.write(("I am your guide, Ashutosh !").length>20);
document.write(("I am your guide, Ashutosh !").length===27);
document.write(("I am your guide, Ashutosh !").substring(4,9));

prompt("What is java?");
prompt(" Doyou know programming?");
window.open("D:/Aa_javaScript/addElement.html");
</script>
<pre>
<h1>What is programming?</h1>
Programming is like writing a list of instructions to
the computer,
so it can do cool stuff with your information.

Programs can't yet make your bed,
but they can do math,
keep track of your bank account,
or send a message to a friend.

Data comes in various types. You have used two already!

a. numbers are quantities, just like you're used to.
You can do math with them.

b. strings are sequences of characters, like the letters a-z, spaces,
and even numbers. These are all strings: "Ryan", "4" and "What is your name?"
 Strings are extremely useful as labels, names, and content for your programs.

To make a number in your code, just write a number as numerals
 without quotes: 42, 190.12334.

To write a string, surround words with quotes: "What is your name?"

As you get started with programming, we will teach you many syntax rules.
This is sort of like the grammar of programming languages. Grammar first,
then programming poetry!

 Now, computers are very literal. Syntax needs to be in exactly the right
place for the computer to understand the code.

There are many mistakes in this code. Find them and fix them all.

You are doing what's called "debugging," a term popularized by Grace Hopper when she literally removed a moth from her computer.


</pre>
</body>
</html>

Thanks
Happy programming!

No comments:

Post a Comment

How can I run a C++ program directly from Windows?

How-can-I-run-a-C-program-directly-from-Windows