Skip to content

Instantly share code, notes, and snippets.

@freekrai
Last active Aug 11, 2017
Embed
What would you like to do?
questions
var string = "Alphabet";
function firstNonRepeatedCharacter(string) {
var string = string.toLowerCase();
for (var i = 0; i < string.length; i++) {
var c = string.charAt(i);
if (string.indexOf(c) == i && string.indexOf(c, i + 1) == -1) {
return c;
}
}
return null;
}
var result = firstNonRepeatedCharacter(string);
console.log( result );
SELECT c.name, c.email FROM Customer as c, CustomerCreditCards as cc WHERE c.id = cc.customer_id AND cc.expirationdate BETWEEN DATE_SUB(NOW(), INTERVAL 14 DAY)
$("div a[target!='_blank"]").hide(); 

would fail, but:

$("div a[target!='_blank']").hide(); 

would work.

It would also hide option B:

<div>
	<a href="https:/www.google.com" target="_top">Clickme</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment