jepehair Posted February 20, 2012 Share Posted February 20, 2012 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!... updateJS.zip CSS3Update.zip Updatecanvas.zip Link to comment Share on other sites More sharing options...
thescientist Posted February 20, 2012 Share Posted February 20, 2012 are you asking for them to be translated to french? Or are you saying those topics are missing in general, because I'm sure they are there. Link to comment Share on other sites More sharing options...
jepehair Posted February 20, 2012 Author Share Posted February 20, 2012 If y suggest to add those topics in your tutorials this is because they are missing in general. Link to comment Share on other sites More sharing options...
Ingolme Posted February 20, 2012 Share Posted February 20, 2012 I don't believe W3Schools covers with{} but I know that they do teach if(). I think it's for the best not to teach "with" because there is no good use for it. It's a bad thing to use altogether. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 20, 2012 Share Posted February 20, 2012 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 More sharing options...
thescientist Posted February 20, 2012 Share Posted February 20, 2012 looks like EMCAScript5 is bringing the hammer down on with too.https://developer.mozilla.org/en/JavaScript/Reference/Statements/with Link to comment Share on other sites More sharing options...
justsomeguy Posted February 20, 2012 Share Posted February 20, 2012 Right, with is removed in ES5 strict mode, but strict mode is optional. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.