5.2: Associative Arrays in JavaScript - Programming with Text

  Рет қаралды 35,752

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 53
@Icecrax
@Icecrax 8 жыл бұрын
Im so happy I found your channel... pity, that I didnt find it earlier... I really love your tutorials, you explain very good.
@fulleride05
@fulleride05 7 жыл бұрын
Be honest that's how it is with all these great channels, Fun Fun Function is incredible too. Everything about programming I wish I would have found sooner, but I always remind myself "at least you found it and you are better than you were yesterday because of it".
@merajjahir2602
@merajjahir2602 3 жыл бұрын
i really liked the video and i feel like it is a very subtle topic that doesn't get much attention . thank you shiffman .
@JesseGilbride
@JesseGilbride 3 жыл бұрын
These are two different objects in memory, not at all the same thing: var word = "unicorn"; dict.word = 99; What he did there was attach a new property called "word" to dict that's its own thing. It would be different if he instead wrote: var word = "unicorn"; dict.word = word; // assignment of the variable `word` to the object property called `word` dict.word = 99; // overwrite the old value of dict.word with a new value Also, using the variable `word` in the bracket notation is just utilizing the already-established variable, `var word`: dict[word] // this is grabbing the value from `var word = "unicorn"; you don't notice what happened because he assigned 100 before doing anything else (ie, checking what it's value is before the assignment of 1000.
@gamma_v1
@gamma_v1 7 жыл бұрын
1:00 "An array is an ordered list of stuffs". Well, list by definition is ordered, so "ordered" in "ordered list" is redundant. You could say "ordered set".
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Good point!
@ismailssenyange3134
@ismailssenyange3134 2 жыл бұрын
1. Words Tracker Write a function that receives an array of words and finds occurrences of given words in that sentence. The input will come as an array of strings. The first string will contain the words you will be looking for separated by a space. All strings after that will be the words in which you will check for a match. Print for each word how many times it occurs. The words should be sorted by count in descending. Example Input [ 'this sentence', 'In', 'this', 'sentence', 'you', 'have', 'to', 'count', 'the', 'occurances', 'of', 'the', 'words', 'this', 'and', 'sentence', 'because', 'this', 'is', 'your', 'task' ] Output this - 3 sentence - 2
@mluevanos
@mluevanos 8 жыл бұрын
Love the show, keep it going!
@SmokingGummyBears
@SmokingGummyBears 8 жыл бұрын
As always, thank you for sharing your knowledge.
@Chrosam
@Chrosam 4 жыл бұрын
07:52 I think that's what everyone subscribed for
@pleabargain
@pleabargain 7 жыл бұрын
10:50 Would let or const fix the problem of the dict object not 'knowing' word?
@flax5977
@flax5977 8 жыл бұрын
I love your videos, Dan! But where can I watch your live streams, and when?
@CameronChardukian
@CameronChardukian 5 жыл бұрын
As a juggler I loved your crazy juggling stuff hahahaaaa
@dennis_johnson
@dennis_johnson 7 жыл бұрын
So basically a python dictionary?
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Yes indeed!
@dennis_johnson
@dennis_johnson 7 жыл бұрын
General question.....do you think it's hard to find a coding job? I'm in high school just wanted to know.
@oumoumad
@oumoumad 7 жыл бұрын
just like in most fields, it depends how good and how motivated you are. But I noticed that there is so much demand on developers lately than ever, especially for web and mobile applications. Because every company/service needs a website and with the fact that almost everyone in the globe at least has a smartphone and half of them have other devices (tablets, smart tvs etc...). Coding has become needed more than ever. So much that some schools are starting to teach young kids basics of code ^^.
@dennis_johnson
@dennis_johnson 7 жыл бұрын
mohamed oumoumad Thanks for the insight. I myself have been really intersted in coding and am still in high school. I really only entered the coding world a few months ago. Its amazing how much you can learn in a short period of time.
@oumoumad
@oumoumad 7 жыл бұрын
Oh yeah, same here, I'm actually a CG artist, and that's what I studied in my school, I only got into coding when I started making scripts for my 3d software last year. There's so much information with a great community to learn from on the internet. Absolutely anyone can become a developer easily today than ever before.
@Chiaration
@Chiaration 8 жыл бұрын
What language should a beginner learn as their first language?
@euzink
@euzink 8 жыл бұрын
This is a kinda tricky question, everyone will point you in the direction of their favourite programming language, in the beginning I would suggest focussing more on logic and less on the language itself, if you do it properly you should have no problem picking up any language afterwards, I started with python, you should look it up is very syntax light, also look up Pascal,its a bit outdated but its very educational, or maybe follow this channel's tutorials and go for JavaScript.
@Chiaration
@Chiaration 8 жыл бұрын
Thanks for the advice! What about Ruby? Is it worth learning?
@euzink
@euzink 8 жыл бұрын
I never really learnt ruby, I used it once with ruby on rails but don't really remember, so can't answer you, but any language is worth learning, if for nothing else for the "fun"
@Chiaration
@Chiaration 8 жыл бұрын
What did you first learn and how long did it take?
@euzink
@euzink 8 жыл бұрын
Python when I was 16 it took about 2 months to start really programming, but I didn't dedicate much time
@niklasromanowski101
@niklasromanowski101 5 жыл бұрын
4:30 That noise is really driving you crazy. ;)
@ronaldlogan3525
@ronaldlogan3525 4 жыл бұрын
You should team up with Bob Ross who can draw a happy little cloud, and learn how to use a paintbrush to draw a happy little array.
@DeepakPalVlogs-sj4yk
@DeepakPalVlogs-sj4yk 6 жыл бұрын
var array = new Array(); array[1]=1; array[2]=2; array.city = "Roorkee"; then array.length gives 2 instead of 3 ? please elaborate this
@filipmarszaek9990
@filipmarszaek9990 4 жыл бұрын
Thanks a lot It was very helpful.
@Ozziepeck11
@Ozziepeck11 7 жыл бұрын
that white box in the bottom left... grr. Awesome video though!
@mayankraghuvanshi486
@mayankraghuvanshi486 6 жыл бұрын
Is it take O(1) for lookup a particular string exist or not or O(logn) ??
@JesseGilbride
@JesseGilbride 3 жыл бұрын
O(1) for best/average case. Assuming you're alluding to hash maps, if the hash map's element that matches the key lookup contains a list (or object) of several (because a collision required more than one to be stored there), that would be larger, but it's usually not very long, so it's generally thought of as O(n).
@Banzaci
@Banzaci 5 жыл бұрын
Kids, never do drugs while doing an array video on KZbin!
@prithazz
@prithazz 5 жыл бұрын
loooool
@8koi245
@8koi245 Жыл бұрын
Ohhh everything is an object... often forget that
@mitchellbarton7915
@mitchellbarton7915 5 жыл бұрын
can't tried to open the contraction as a string for me. that's why it couldn't find it.
@blackpurple9163
@blackpurple9163 Жыл бұрын
So we're all talking about objects here? Arrays are objects too but is this the proof of how arrays came to be ?
@dexterellis7973
@dexterellis7973 6 жыл бұрын
Thank you!
@sergiogranadamoreno
@sergiogranadamoreno 8 жыл бұрын
Thanks man!
@Mehedihasan-rahat
@Mehedihasan-rahat Жыл бұрын
Mr.psycho why associative array does not contain anonymous function as key value pair in class??? But it contains anonymous function into global scope.... What is the reason behind this???😮😮😮
@kamoroso94
@kamoroso94 8 жыл бұрын
Associative arrays are so nice to work with in JavaScript. Too bad the keys can only be strings though.
@Retrofire-47
@Retrofire-47 Жыл бұрын
Behold! The impetus behind the creation of JavaScript maps.
@rhlgm
@rhlgm 7 жыл бұрын
is dict or something?
@jainshilpi3
@jainshilpi3 7 жыл бұрын
where is the next part of this ?
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Check the video description for "next video"
@veekay2254
@veekay2254 2 жыл бұрын
seems the instructor knows human psychology well..
@idamusovic449
@idamusovic449 3 жыл бұрын
Thank you!
@Mehedihasan-rahat
@Mehedihasan-rahat Жыл бұрын
Mr.psycho why associative array does not contain anonymous function as key value pair in class??? But it contains anonymous function into global scope.... What is the reason behind this???😮😮😮
Coding Challenge #40.1: Word Counter in JavaScript
21:54
The Coding Train
Рет қаралды 50 М.
2.6: Regular Expressions: test() and match() - Programming with Text
16:50
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 136 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 29 МЛН
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 428 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 294 М.
you will never ask about pointers again after watching this video
8:03
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 1 МЛН
2.3: Regular Expressions: Character Classes - Programming with Text
14:22
8.5: Saving Data to JSON File with Node.js - Programming with Text
17:00
The Coding Train
Рет қаралды 225 М.
2.9: Regular Expressions: replace() - Programming with Text
18:50
The Coding Train
Рет қаралды 76 М.
2.4: Regular Expressions: Capturing Groups - Programming with Text
13:42
The Coding Train
Рет қаралды 154 М.
Collisions Without a Physics Library! (Coding Challenge 184)
31:05
The Coding Train
Рет қаралды 124 М.
3.1: The RiTa.js Library - Programming with Text
20:46
The Coding Train
Рет қаралды 51 М.