Intro to Javascript - Programming Virgin

preview_player
Показать описание
Welcome to the Codebabes programming virgin course. In this course all you need is a text editor, a computer, a browser, and your brain. This course explains basic programming concepts used in languages like Ruby, Python, PHP, and others just with minor differences in syntax and nomenclature.

We use Javascript in this lesson because it's a good language to start with. It's based on C like a bunch of other languages, and your browser understands it. We'll show you how to write it directly in the browser.

Programming languages are just a tool, a means to an end. Once you master the concepts of programming and a language or two, it makes it easier to learn new ones. Just like if you're good at picking up babes. Once you figure it out, it doesn't matter who the next one is right? I'm sure you're all regular casanovas.

First, let's add some javascript to a basic webpage. We've got an html page already written in a directory on our desktop. We just need to add a javascript file named script dot JS inside our website directory. Ok, open the html file and add the script tag between the head tags. We do this by writing the script tag and then source equal to the path of our javascript file in relation to this html file. Since they are in the same directory we can just write the name of the file, script dot js. When the browser sees this it knows there's some javascript up in here. You can name your javascript file whatever you want, but script dot js is pretty common.

That's a good way to add javascript to a page. If you wrote some javascript in here, it would load when you opened this html file. But, let's explore an even easier way to start writing javascript. Everybody likes easy right?

Open the html file with Chrome. On a side note, Chrome is an awesome browser to use, but as long as you're not using Internet Explorer you are in pretty good shape. If you use Internet Explorer you're definitely not getting my number.

Once you're in chrome you need to open the javascript console. Go to view, developer, then javascript console. There's also a keyboard shortcut. If you're getting into programming, start learning keyboard shortcuts, they are super sexy.

Now we have a console to frolick in. This is similar to the command line. It allows you to write javascript commands that the browser will interpret.

Let's start with some math. Math is sexy! We can do 1 + 1, and it will output 2. Easy right? We can get more complicated too, like (20 + 3) * 3. Which equals 69. So, then we would type, hahaha, cause you know, we're all pretty immature. Except if you do that and hit enter you'll get an Error! This is because javascript doesn't know what hahaha is. We want it to be interpreted as the word 'hahaha', a string in programming lingo. Numbers are known as integers. Strings and integers are common throughout programming. If a number has a decimal attached then it's called a float.

The thing with strings is that they need to be enclosed in quotes. If it's not in quotes javascript doesn't know whether the text is a command, variable or in this case, a string.

A string can be numbers too, like a phone number. We don't want a phone number to be treated like a normal integer, so we wrap it in quotations and make it a string.

You can also put together two strings, like "hey girl " and "you had me at hello world" with the plus sign, but make sure to have a space after hey girl. In programming lingo, putting stuff together like this is called concatenation.

Let's get a little freaky. We can use built in javascript functions to make things more interactive. Let's write alert, parentheses, then the string, "stop playing with yourself" in quotes. Hit return and this pops up an alert in the browser. If you want to run that command again in the console you can just hit the up arrow on your keyboard. A function is just a bit of code that you can use over and over again to do stuff, all kinds of stuff. Programming languages have built in functions, but you can also write your own, which we'll talk about later.

That's it for the intro to programming. Next lesson we'll talk about our first topic, variables. And I'll turn up the heat.
Рекомендации по теме
Комментарии
Автор

Not sure If I should be fapping or taking notes. So I did both just to be on the safe side.

elementfayt
Автор

This is the first time I've heard someone mix sex and programming

whatdone
Автор

"im sure you'r regular casanova's" -> i laughed 

zrebrutibreniti
Автор

js is based on C ? 
Hmm lets go deeper :D

harabesho
Автор

Javascript is not based on C.
It's syntax was made to resemble java, and it's design principles are based on Scheme and self, and some others that came from Xerox Parc.

Please don't spread misinformation.

alexsage
Автор

Wait, so who had the idea of mixing hookers and code, genious, this will surely apeal to the average Joe out there making them think everyone can be a computer scientist.

carlossanchez
Автор

This is a genius idea.i got a job thanks to code babes.Thank you ladies.your changing lives.#fuckthehaters

techwolfindustries
Автор

In one quick intro video they manage to show why js bad.

Henryarsenal
Автор

Really, Nice Concept and This tutorial was amazing! Carry on :)

it-all-software
Автор

I've only come here for the chick.Truth is there's no way you could learn from this video

mrX-sp
Автор

Who is the girl in this video? Super cute!

ricksaw
Автор

YOOOO These videos are amazing!! THank you. Even such an idiot like myself started getting this shit. 

goldewl
Автор

damn! never knew about the js console!!! gosh

KeaJei
Автор

You guys helped me understand javascript finally, ... thanks alot! please make more advanced videos.

eisigereisiger
Автор

Why u guys stopped making videos ?? really Sad u didnt continue ...

ziyadkader
Автор

really nice video. i like it alot. know
i can say my teacher that i learn programming.
its like heaven to see ya <3

masonsmusicroom
Автор

I found it hard to learn while watching this one... Maybe lingerie would have helped 🤷🏿‍♂️

iferulz
Автор

I am a commerce student but i think i will be a web developer soon.

gautambansal
Автор

WOWOWOWW The ywo things i like most! Coding and GURRLZ! AYYY

frederikwaltherliberothchr
Автор

I like this girl. I want to known her name.

СержСмайлов
visit shbcf.ru