Horje
JavaScript Strings Code Example
new line javascript
console.log('Hello \n World');
string js
const string1 = "A string primitive";
const string2 = 'Also a string primitive';
const string3 = `Yet another string primitive`;
const string4 = new String("A String object");
string in js
let str1 = 'hello'
let str2 = 'hello'
let strObj1 = new String('hello');
let strObj2 = new String('hello');

console.log(str1 === str2) // true

console.log(str1 == strObj1) // true
console.log(str1 === strObj1) // false

console.log(strObj1 == strObj2) // false
JavaScript Strings
var x = "SAMER";
js string
let longString = "This is a very long string which needs \
to wrap across multiple lines because \
otherwise my code is unreadable.";
js string
return 'cat'[1]; // returns "a"




Javascript

Related
check if is function javascript Code Example check if is function javascript Code Example
javascript prevent iframe interaction Code Example javascript prevent iframe interaction Code Example
how to call function on every keypress in jquery Code Example how to call function on every keypress in jquery Code Example
react navbar material ui Code Example react navbar material ui Code Example
angular property value does not exist on type Event Code Example angular property value does not exist on type Event Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8