Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

7.2. Bracket Notation¶

/*An expression of the form someString[i] gives the character at index i.
This program prints out the initials of the person's name.*/

let jsCreator = "Brendan Eich";
let firstInitial = jsCreator[0];
let lastInitial = jsCreator[8];

let outputStr = "JavaScript was created by somebody with initials " +
   firstInitial + "." +
   lastInitial + ".";

console.log(outputStr);
Comment

PREVIOUS NEXT
Code Example
Javascript :: style react native alert text 
Javascript :: angular observer if not length 
Javascript :: 8.2. Working With Arrays // Undefined 
Javascript :: javascript function to print hello world 
Javascript :: hello-world.js 
Javascript :: 9.4.1.3. Update Expression¶ // Loops 
Javascript :: exemple de modal reactjs 
Javascript :: add key to object only when there is value 
Javascript :: filter a query string with comparison operator 
Javascript :: when i send req upload image in node give Error: ENOENT: no such file or directory,ues multer 
Javascript :: useSate object 
Javascript :: dynamically populate vue material table 
Javascript :: how to make a website send form to you 
Javascript :: localstorage API JS get Item 
Javascript :: get day first 3 letters name in js 
Javascript :: js painting app 
Javascript :: how to log knex.raw query 
Javascript :: fly: javascript fly 
Javascript :: Invariant Violation: [React Intl] An `id` must be provided to format a message. 
Javascript :: create serverless hello-world 
Javascript :: javascript to python converter online 
Javascript :: js % 
Javascript :: stop interval javascript 
Javascript :: react application preloader add 
Javascript :: two jq events 
Javascript :: find document which is not in array 
Javascript :: random number from 1 to 10000 js 
Javascript :: JavaScript : Generate random element of an array : 
Javascript :: how to slice one specific element from array in angular 
Javascript :: animating using jquery 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =