Jump to content

New topics to add in W3Schools.com tutorials


Recommended Posts

Congratulation for your well documented site. Y have translated some html pages of it in French. And y have add some topics :

  • two topics in the Javascript tutorial : The iif function and the with statement
  • one large topic in the CSS3 tutorial : gradient colors backgrounds
  • two methods for the canvas.getContext("2d").

Excuse me if my English is sometime incorrect.Good afternoon!...




Link to comment
Share on other sites

Javascript doesn't have an iif function, but it does have a conditional ternary operator which is described on the page about comparison operators: http://www.w3schools...comparisons.asp The with statement is a little more tricky. It has several valid uses, but they are fairly advanced and beginners are much more likely to cause problems using with than they are likely to write elegant code. This thread explains some of the pros and cons of with: http://stackoverflow...-with-statement In particular, the reply from Shog9 which shows using with to help define variable scope is probably the single most useful feature of it, but beginners seem to have a hard time understanding scope in Javascript and this may confuse them more until they understand scope. One of the major pitfalls of with is illustrated in the reply by Alan Storm, where you may end up with unexpected behavior in your program that isn't immediately obvious (especially to a beginner) and may be difficult to track down. Regardless, thanks for taking the time to put the changes together.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...