Day 164

A tutorial in Javascript...  Here we go.
#CodingPhase #TheCodingWay #365CodingPhaseChallenge

**********

    <script language="javascript" type="text/javascript">
        <!-- Hide JavaScript Code
        // JavaScript is case sensitive - Variables & Functions must use the same capitalization
        // Variables must start with a Letter, _, or $ then numbers
        // 4 Datatypes- Numbers, Strings, Booleans, Objects
        // Maximum and Minimum Numbers (Precision is not guaranteed past 16 digits)
        document.write(Number.MAX_VALUE+"<br />");
        document.write(Number.MIN_VALUE+"<br />");
        // Strings - Series of characters surrounded by quotes
        var samp_str = "Here are escaped characters \' \" \\ \t \n";
        document.write(samp_str+"<br />"); // Newlines have no control in html
        // String Functions
        var first_str = "First String ";
        var second_str = "and Second String";
        var combined = first_str + second_str;
        document.write(combined+"<br />");
        document.write("Length of string: " + combined.length+"<br />");
        document.write("Substring " + combined.substring(6,12) +"<br />"); // Go 1 more than needed
        document.write("Last character " + combined.charAt(combined.length-1)+"<br />");
        document.write("Index of T " + combined.indexOf('t') +"<br />");

Comments

Popular posts from this blog

Day 1

Day 365 + 1

Day 365 + 2