C a lc u la te a ve ra g e o f m a rks va r a p

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: m a rks : va r a = ( p a rs e Int(d o c u m e nt.F1 .C Ma rk.va lu e ) + p a rs e Int(d o c u m e nt.F1 .EMa rk.va lu e ) + p a rs e Int(d o c u m e nt.F1 .MMa rk.va lu e ) ) / 3 ; a le rt(a ) ; But manually adding semicolon is a common practice. (In Java, C .., adding semicolon is a must. Most programmers have adapted this rule already) Sometimes we get trouble if we handle line break or semicolon with mistake. (CS1301) Introduction to Computer Programming Don't rely on the automatic insertion of semicolons. 4. Program Structure III - 2 http://www.cs.cityu.edu.hk/~helena ( An interesting discussion is available see HOT questions at the course web) City Univ of HK / Dept of CS / Helena Wong Location of JavaScript Blocks There can be more than 1 JavaScript blocks. JavaScript blocks can be in : <head> </head>, and <body> </body> <h tm l> <h e a d > <title >De m o </title > <s c rip t ty p e =" te xt/ja va s c rip t" > (See below) But we usually put most in &l...
View Full Document

Ask a homework question - tutors are online