subtitles about

Upload: jay-riddle

Post on 14-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 subtitles about

    1/3

    si componentele din inauntrul lui au ori latimi masurate in procente ori latimifixe. Lucrul important este ca elementul container ( invelisul ) este setat sa nu se miste. Indiferent de ce rezolutie a ecranului au vizitatorii, el sau ea vorvedea aceeasi latime ca si ceilalti vizitatori. Imaginea de mai sus arata conturul general al unui aspect de site cu latimea fixa. Componentele din inauntru sunt fixate la 520, 200, respectiv 200 pixeli. O latime de 960 pixeli a devenit standard in web designul modern pentru ca cei mai multi utilizatori se presupune ca navigheaza intr-o rezolutie de 1024-768 sau mai mare.

    b. Aspecte fluideIntr-un aspect fluid, de asemenea mentionat ca un aspect lichid, majoritatea componentelor dinauntru au latimi masurate in procente, si prin urmare ajusteaza rezolutia ecranului utilizatorilui. Imaginea de mai sus arata un aspect fluid. Intimp ce cativa designeri pot seta latimile anumitor elemente in aspectele fluide, cum ar fi marginile, aspectul in general foloseste latimile masura in procente, astfel incat vizualirarea este ajustata pentru fiecare utilizator.

    4400:03:03,000 --> 00:03:08,990Now here is a place where JavaScript will let you be sloppy. I won't.

    4500:03:09,000 --> 00:03:12,990Now technically the word var is not even required.

    4600:03:13,000 --> 00:03:17,990In JavaScript if you just write a line of code like this without var, JavaScript

    4700:03:18,000 --> 00:03:21,990will go looking for an existing variable called year to put this value in, but

    48

    00:03:22,000 --> 00:03:26,990if it doesn't find it, it will just make it.

    4900:03:27,000 --> 00:03:30,990However, we are always going to use the word var when defining our variables.

    5000:03:31,000 --> 00:03:35,990There are couple of situations where leaving var off can lead to unexpected

    5100:03:36,000 --> 00:03:38,990

    behavior, so make a habit of always using it in your JavaScript.

    5200:03:39,000 --> 00:03:42,990Now once again JavaScript is case sensitive.

    5300:03:43,000 --> 00:03:47,990That means if I create a variable called x with a lowercase x, that's one.

  • 7/27/2019 subtitles about

    2/3

    5400:03:48,000 --> 00:03:50,990If I use the word uppercase X, that's two.

    5500:03:51,000 --> 00:03:52,990These are two different variables.

    5600:03:53,000 --> 00:03:55,990This second line here might have been an accident.

    5700:03:56,000 --> 00:03:59,990Maybe I meant to say lowercase x, but because of the automatic creation of

    5800:04:00,000 --> 00:04:06,990variables without the word var, you would now have two different variables and

    5900:04:07,000 --> 00:04:10,990nothing in JavaScript would actually give you an error on this.

    6000:04:11,000 --> 00:04:12,990So be careful when you're naming your variables.

    6100:04:13,000 --> 00:04:18,990Now if you are creating multiple variables at the same time, you can of course

    6200:04:19,000 --> 00:04:23,990do them on multiple lines like this but you can actually combine them on to one

    63

    00:04:24,000 --> 00:04:26,990line, separating the variable names with commas.

    6400:04:27,000 --> 00:04:31,990It's just a shorthand way of doing this. And similar to that if you're actually

    6500:04:32,000 --> 00:04:37,990creating multiple variables and giving them all initial values you can still

    6600:04:38,000 --> 00:04:39,990

    combine them on to one line.

    6700:04:40,000 --> 00:04:42,990This makes it a little easier to read, a little shorter to write.

    6800:04:43,000 --> 00:04:48,990Now in JavaScript, once you've actually created a variable you can put anythingin it.

  • 7/27/2019 subtitles about

    3/3

    6900:04:49,000 --> 00:04:53,990Numbers, text, dates, it could start with a number, then put some text, then put

    7000:04:54,000 --> 00:04:57,990a date in it, and that might not sound unusual, but a lot of other languages

    7100:04:58,000 --> 00:04:58,990don't let you do that.

    7200:04:59,000 --> 00:05:03,990Creating a variable in many languages does not just mean defining a container

    7300:05:04,000 --> 00:05:08,990but also saying what type of container it is and what it can hold, and while

    7400:05:09,000 --> 00:05:12,990that's not essential in JavaScript, it's really useful to know.

    7500:05:13,000 --> 00:05:23,000

    More reasons to publish on Scribd

    Scribd's platform is designed to help you easily publish your content on the weband mobile devices, distribute it to a wide and global audience, and potentially make money from selling that content. Here's more on the benefits of publishing on Scribd.