This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i,l, | |
str = 'Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;', | |
poetryM = {'stanza':[[0,109]],'line':[[0,23],[24,53],[54,84],[85,109]]}; | |
console.log('the poem is '+str.length+' characters long'); | |
for(i=0,l=poetryM.line.length;i<l;i++){ | |
console.log('line '+i+': '+str.slice(poetryM.line[i][0],poetryM.line[i][1])); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'stanza':[ | |
[0,109] | |
], | |
'line':[ | |
[0,23], | |
[24,53], | |
[54,84], | |
[85,109] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'p':[ | |
[0,109] | |
], | |
'br':[ | |
[24], | |
[54], | |
[85] | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<stanza> | |
<line>Mary had a little lamb,</line> | |
<line>Its fleece was white as snow,</line> | |
<line>And every where that Mary went</line> | |
<line>The lamb was sure to go;</line> | |
</stanza> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
Mary had a little lamb,<br/> | |
Its fleece was white as snow,<br/> | |
And every where that Mary went<br/> | |
The lamb was sure to go; | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mary had a little lamb, | |
Its fleece was white as snow, | |
And every where that Mary went | |
The lamb was sure to go; |