Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#Modules
bower_components
node_modules
node_modules

.DS_Store
13 changes: 8 additions & 5 deletions rawstrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ var printLetter1 = function () {
return 'print the fourth letter in this string';
};

// Find and use a method that creates one string out of the two strings in the function body
// Output: 'Javascript is so much fun I wish I could code in javascript all day, every day!'
var bridgeString1 = function() {
'Javascript is so much fun'
'Javascript is so much fun.'
'I wish I could code in javascript all day, every day!'

return
};

// this function seems out of place - move to another deck?
var characterEscapes = function() {
'I can't think of it right now. I don't have any idea.'
// 'I can't think of it right now. I don't have any idea.'
};

/////////////////// STRING METHODS /////////////////////

/*
SEARCH THE INTERNET FOR 'JAVASCRIPT STRING METHODS'.
SEARCH THE INTERNET FOR 'JAVASCRIPT STRING METHODS'.
FIND AND USE METHODS TO SOLVE THE FOLLOWING PROBLEMS
*/


// Create a function that returns the 10th letter of the string:
// 'print the tenth letter in this string'
// Output:
// Output:
var printLetter2 = function() {
return 'print the twelfth letter in this string';
};
Expand All @@ -43,8 +46,8 @@ var bridgeString2 = function() {
return
};

// Remove the word 'Python' and replace it with 'JavaScript'
var replaceString = function() {
// Remove the word 'Python' and replace it with 'JavaScript'
'I wish I could code in Python all day, every day!'
};

32 changes: 32 additions & 0 deletions slideChanges.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// JS Data Types Review
// slide 7

// Primitive Data Types
'hello world' // string
'hello world'[6] // 'w'

5 // number
5 * 5 // 25

true // boolean
!true // false

null // null
!null // true
!! null // false

undefined // undefined
!undefined // true
!! undefined // false

// slide 7.5

// Introduce variables
// variables point to data
var dogName = 'Spot';
dogName; // 'Spot'
var myDog = 'Freckles';
myDog; // 'Freckles'
myDog = dogName;
myDog; // 'Spot'

48 changes: 44 additions & 4 deletions spec/rawstrings.spec.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,60 @@
/* global raw strings, describe, it, expect, should */

describe('printLetter()', function () {
describe('printLetter1()', function () {
'use strict';

it('exists', function () {
expect(printLetter).to.be.a('function');
expect(printLetter1).to.be.a('function');

});

it('does something', function () {
expect(typeof printLetter()).to.equal('string');
expect(typeof printLetter1()).to.equal('string');
});

it('does something else', function () {
expect(printLetter()).to.equal('n');
expect(printLetter1()).to.equal('n');
});

// Add more assertions here
});

describe('bridgeString1()', function () {
'use strict';

it('exists', function() {
expect(bridgeString1).to.be.a('function');

});

it('does something', function () {
expect(typeof bridgeString1()).to.equal('string');

});

it('does something else', function() {
expect(bridgeString1()).to.equal('Javascript is so much fun. I wish I could code in javascript all day, every day!')

});

});

describe('characterEscapes()', function() {
'use strict';

it('exists', function () {
expect(characterEscapes).to.be.a('function');

});

it('does something', function () {
expect(typeof characterEscapes()).to.equal('string');

});

it('does something else', function () {
expect(characterEscapes()).to.equal('I can\'t think of it right now. I don\'t have any idea.');

});

})