473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

if statment

hi
can any one help me pleaseto understand about if statment because Idid not really understood this topic from teacher and i will have final exam after few day

thank you
Jun 1 '07 #1
3 1164
dmjpro
2,476 2GB
hi
can any one help me pleaseto understand about if statment because Idid not really understood this topic from teacher and i will have final exam after few day

thank you
It is a conditional statement in programming paradigm.
And it's syntax in JS is like ....


Expand|Select|Wrap|Line Numbers
  1. if(condition) //some statement.
  2. else // do something else.
  3. if the condition is true then first statement executed otherwise else part ll be executed.
  4. take another example.
  5. if(condition1) //statement1
  6. else if(condition2) //statement2
  7. .
  8. .
  9. .
  10. else statement_n
  11. here it is if-else ladder.
  12. now else can not exist without if.
  13. as for example ....
  14. else //statement ... it is an error because else does not exist without if.
  15.  
I think u got my point.
Have a good day.

Kind regards,
dmjpro.
Jun 2 '07 #2
r035198x
13,262 8TB
hi
can any one help me pleaseto understand about if statment because Idid not really understood this topic from teacher and i will have final exam after few day

thank you
Now write some code that uses the if statement and post if you get errors.
Jun 2 '07 #3
acoder
16,027 Expert Mod 8TB
hi
can any one help me pleaseto understand about if statment because Idid not really understood this topic from teacher and i will have final exam after few day

thank you
See this link .
Jun 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: e_AK_05 | last post by:
I have a question and I can't figure out how to do it. I have a select statment : SELECT table1.* AS table1.*, table2.* AS table2.* FROM table1, table2 WHERE 1 this does not work...for me at...
1
by: Joe Saliba | last post by:
Hi, would like to know how to write a crosstable select statment in sql server2000 where having: - ItemNumber, ItemDescription, ItemColor, ItemSize as rows - Stores as columns - Qty * Netttc...
9
by: Appel | last post by:
Hallo i have a problem to add to string with a SQL statement. My Table : Tablename NAMES: | Name1 | Name2 | Name3 | John Meyer I search for a SQL statment that update Name3.
1
by: Maria | last post by:
Hello I have not used db2 in a long time, and I have this very long insert script, which is giving me an error of duplicated inserts. My question is how can I put something in the statment so...
8
by: 73blazer | last post by:
Hello, I'm looking for a way to make some of my insert templates more readable by placing comments in between the values. I cannot seem to find a way to do this with DB2, is there a way? I'm...
1
by: Me, Myself, and I | last post by:
First off, i apologize if my terminology is off... I am currently in a project that is basically a front-end to a database. In coding this, I am taking into account that it has the *potential*...
5
by: orencs | last post by:
Hello, I am using Microsoft.Practices.EnterpriseLibrary.Data. I am running the following sqlCommand = "SELECT var1 FROM table1 WHERE var2 IN (4,5,6) ; SELECT var3 FROM table2 WHERE var2 IN...
5
by: vsteshenko | last post by:
Hello, This is my second post to the any usernet group and the first one was posted to the wrong one. I am currently working on creating an order form for sales associates at my work to be used...
4
by: huzzaa | last post by:
I am using a switch statement that will decide from a random number what message to display. I want the random number to be between 0 and 100 and then if the number is say between 1 and 10 to...
1
by: zeebiggie | last post by:
Good morning I have a form with the controls in the insert statment below. table1 has an Auto increment primary key hence is omitted in the insert statment and form. Am getting the error It didnt...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.