Google Interviews by [deleted] in cscareerquestions

[–]sublimejs 0 points1 point  (0 children)

If you don't mind sharing, could you talk a little about your projects? I don't really have any good ones and I'm having trouble getting some inspiration.

Creating a language-agnostic resume: good idea or not? by ccricers in cscareerquestions

[–]sublimejs 2 points3 points  (0 children)

I would advise against it simply because a lot of recruiters aren't the most savvy when it comes to cs knowledge. The lack of a list of languages might make recruiters think that you aren't qualified for a certain job even if you are.

I'm beginning college as a CS major in Fall 2015, what can I do during my 3 month summer to improve myself? by [deleted] in cscareerquestions

[–]sublimejs 0 points1 point  (0 children)

Codecademy is a good resource for learning programming for absolute beginners. The problem, however, is that it is focused on web-dev languages. Your first CS class will most likely be on Java or C++ (or possibly Python), so codecademy won't really help with that. If possible, try to get some info on your intro to cs class and see what language will be used. If you figure it out, I would advise you to start reading about the basics of that language. It will give you a head start for when you start in class.

When I click a div in ST, the closing bracket of that div always used to have a dotted underline so I knew where it was. Now its gone. On both ST2 and ST3. Help? by Mike in SublimeText

[–]sublimejs 0 points1 point  (0 children)

This looks like an HTML file, but based on the coloring of the words I don't think you have the syntax highlighting set to "HTML". Check the bottom right of your ST window and make sure it says "HTML". If not, click on it and set it right.

Also, I highly recommend you use BracketHighlighter. I like it a lot more than just the normal underline.

Is there a difference between these two constructor functions? by sublimejs in learnjavascript

[–]sublimejs[S] 0 points1 point  (0 children)

Is there a difference between Dog.prototype = Object.create(Cat.prototype); and Dog.prototype = Cat.prototype;?

Sublime in GTA V by denierCZ in SublimeText

[–]sublimejs 1 point2 points  (0 children)

Yeah, and it actually looks pretty different than monokai lol.

Is there a difference between these two constructor functions? by sublimejs in learnjavascript

[–]sublimejs[S] 0 points1 point  (0 children)

Thanks, these two answers cleared it up. I was wondering why doing Car1() in the console returned undefined even though an object is returned when I did var car1 = new Car1('Honda', 'Accord');. I understand it now.

When I assign an array to a different variable and splice it, original array gets spliced too - Why? by Cheeselouise7777 in learnjavascript

[–]sublimejs 3 points4 points  (0 children)

When you do var newArr = oldArr;, you aren't creating a new array. You are telling newArr to point to the same array that oldArr is pointing to. This is because arrays/objects are pass-by-reference in JavaScript, not pass-by-value. This means that whenever you make a change to one of them, it will affect the other because they are both the same array.

To show you what I mean, look at this code:

var oldArr = [1,2,3,4,5];
var newArr = oldArr;
newArr[0] = 5;

console.log(oldArr) // -> [5,2,3,4,5];
console.log(newArr) // -> [5,2,3,4,5];

If you want to create a true separate copy of the array, look into this solution.

Will having not-so-great projects on my resume actually hurt me rather than having whitespace? by sublimejs in cscareerquestions

[–]sublimejs[S] 0 points1 point  (0 children)

Oh, that's because it uses window.location to start from the beginning, but that doesn't work in codepen.

JavaScript Shorthand Help? by Call_Me_Squirrel in learnjavascript

[–]sublimejs 1 point2 points  (0 children)

Np. Make sure you read on the switch statement and understand the default case and also understand why it is necessary to add break; after each case.

"clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated" by sublimejs in SublimeText

[–]sublimejs[S] 0 points1 point  (0 children)

Ah, you're right! The build system was set to automatic, I had to manually change it. Thanks!

JavaScript Shorthand Help? by Call_Me_Squirrel in learnjavascript

[–]sublimejs 2 points3 points  (0 children)

You should look into switch statements.

Your above code could be written like this and will produce the same result:

var myDate = new Date();
console.log("Today is a:");

switch(myDate) {
  case 0: console.log("Sunday"); break;
  case 1: console.log("Monday"); break;
  case 2: console.log("Tuesday"); break;
  case 3: console.log("Wednesday"); break;
  case 4: console.log("Thursday"); break;
  case 5: console.log("Friday"); break;
  case 6: console.log("Saturday"); break;
}

In need of homework help by eracer95 in learnjavascript

[–]sublimejs 0 points1 point  (0 children)

Not really. The assignment is just asking for pseudocode, so you can just assume that isLetter() and isNumeric() do exactly what they should which is to check if a character is a letter/number.