Last active
October 22, 2015 06:30
-
-
Save pandr/261d052f2deaee04a4af to your computer and use it in GitHub Desktop.
JavaScript Strenge
This file contains 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 fornavn = "Hans"; | |
var efternavn = "Jensen"; | |
var navn = fornavn + " " + efternavn; // "Hans Jensen" | |
var tom_streng = ""; | |
var historie = "Der gik en hest"; | |
var laengde = historie.length; // antal bogstaver i historien | |
var fundet = historie.indexOf("var"); | |
var e = historie.charAt(1); // "e" | |
var ord = historie.substr(4,3); // "gik" | |
var alfabet = "abcdefghijklmnopqrstuvwxyz"; | |
var b_code = alfabet.charCodeAt(0); // 98 | |
var a = String.fromCharCode(97); // "a" | |
var tal = "1,2,3,4"; | |
var tal_liste = tal.split(","); // ["1", "2", "3", "4"] | |
var abc = "abc".split(""); // ["a","b","c"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment