<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>yoon_aspyn.log</title>
        <link>https://velog.io/</link>
        <description></description>
        <lastBuildDate>Thu, 19 Aug 2021 07:02:21 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <copyright>Copyright (C) 2019. yoon_aspyn.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/yoon_aspyn" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Objects Cheat Sheet / JavaScript]]></title>
            <link>https://velog.io/@yoon_aspyn/Objects-Cheat-Sheet-JavaScript</link>
            <guid>https://velog.io/@yoon_aspyn/Objects-Cheat-Sheet-JavaScript</guid>
            <pubDate>Thu, 19 Aug 2021 07:02:21 GMT</pubDate>
            <description><![CDATA[<h2 id="object객체">&gt; object(객체)</h2>
<blockquote>
<p>자바 스크립트는 객체 기반의 스크립트 언어.
객체의 구성요소로는 property , method가 존재한다. (객체는 이들을 감싸고 있는 껍데기와 같은 느낌으로 이해!)
*<em>property *</em>: key , value 한쌍으로 이루어짐 / 데이터
           key : 빈 문자열을 포함하는 모든 문자열 또는 symbol값
           value : 모든 값
*<em>method *</em>: 데이터를 참조하고 조작할 수 있는 동작(behavior)</p>
</blockquote>
<p>자바스크립트의 객체는 객체 지향의 상속을 구현하기 위해 프로토타입(prototype)이라고 불리는 객체의 프로퍼티와 메소드를 상속 받을 수 있다. 이 프로토 타입은 타 언어와 구별되는 중요한 개념.</p>
<p><strong>Object Literal Notaion:</strong></p>
<pre><code>var object = {};</code></pre><p><strong>Bracket Notation:</strong></p>
<pre><code>object[&#39;property&#39;]=value;</code></pre><p><strong>Dot Notation</strong></p>
<pre><code>object.property = value;</code></pre><p><strong>Object Constructor Functions (생성자 함수)</strong></p>
<pre><code>// 빈 객체 생성
var person = new Object();
// 프로퍼티 추가
person.name = &#39;lee&#39;;
person.gender = &#39;male&#39;;

console.log(typeof person); // object
console.log(person); // {name:&quot;lee&quot;, gender:&quot;male&quot;}</code></pre><pre><code>//1. 생성자 함수를 작성하여 객체를 정의.
//2. new 키워드를 사용하여 객체의 인스턴스 생성
function book (page, writer, years, novel, codeNumnber){
    this.book = book;
    this.writer = writer;
    this.years = years;
    this.novel = novel;
    this.codeNumnber = codeNumnber;
}

var book1 = new Book(500, &#39;yoon&#39;, &#39;1995&#39;, true, 56);
console.log(book1); 
//</code></pre><p>JavaScript Beginner Bootcamp (2021)</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[JavaScript Building Blocks: Mini Apps / Java Script]]></title>
            <link>https://velog.io/@yoon_aspyn/JavaScript-Building-Blocks-Mini-Apps-Java-Script</link>
            <guid>https://velog.io/@yoon_aspyn/JavaScript-Building-Blocks-Mini-Apps-Java-Script</guid>
            <pubDate>Thu, 19 Aug 2021 05:54:47 GMT</pubDate>
            <description><![CDATA[<p><strong>&gt; Mini Project: Kelvin to Fahrenheit</strong></p>
<ol>
<li><p>Let&#39;s imagine that the weather reports says that the temperature today will be  301 Kelvin. How should you dress for the day? Let&#39;s create an app that lets us know the temperature in fahrenheit. To start, create a variable named kelvinTemp, and set it equal to 301. Write a comment above that explains this line of code.</p>
</li>
<li><p>Finding the temperature in Celsius is similar to Kelvin — the only difference is that Celsius is 273.15 degrees less than Kelvin.</p>
</li>
</ol>
<p>Let&#39;s convert Kelvin to Celsius by subtracting 273.15 from the kelvinTemp variable. Store the result in another variable, named celsiusTemp.</p>
<p>Write a comment above that explains this line of code.</p>
<ol start="3">
<li>Use this equation to calculate Fahrenheit, then store the answer in a variable named fahrenheitTemp.</li>
</ol>
<p>Fahrenheit = Celsius * (9/5) + 32</p>
<p>In the next step we will round the number saved to fahrenheitTemp. Write a comment above that explains this line of code.</p>
<ol start="4">
<li><p>Log to the console the value of  fahrenheitTemp. In our next step we are going to see what we can do to make sure that our number is a whole number by rounding down. The value you logged to the console should begin with 82.13</p>
</li>
<li><p>As we have just seen, when you convert from Celsius to Fahrenheit, you often get a decimal number. Go ahead and delete the console log code from step 4.</p>
</li>
</ol>
<p>Use the .floor() method from the Math library to round down the Fahrenheit temperature. Save the result to the fahrenheitTemp variable. Check out the documentation for Math.floor() here: <a href="http://bit.ly/javascript-math-floor">http://bit.ly/javascript-math-floor</a>. Because this is a new concept we haven&#39;t covered yet, you may want to watch the next video if you get stuck at this point. This will round your decimal down no matter what the value. Other methods from the Math library you might try out are .round() and ceil(). Write a comment above that explains this line of code.</p>
<ol start="6">
<li>Use console.log and string concatenation to log the temperature in fahrenheitTemp to the console to create the message as follows: The temperature is TEMPERATURE degrees Fahrenheit. TEMPERATURE should be determined by the value of fahrenheitTemp.</li>
</ol>
<pre><code>        //Temperature in kelvin stored in variable `kelvin`
        var kevinTemp = 301;

        //Temperature in celsius stored in variable `celsius` 섭씨
        var celsiusTemp = kevinTemp - 273.15;

        //convert celsius to fahrenheit stored in variable `fahrenheit` 화씨
        var fahrenheitTemp = celsiusTemp * (9 / 5) + 32;

        //round the value of fahrenheit down and assign to `fahrenheit` 
        fahrenheitTemp = Math.floor(fahrenheitTemp);

        console.log(&quot; The temperature is &quot; + fahrenheitTemp + &quot; degrees Fahrenheit &quot;);

        //Math.cell : 올림 / floor : 내림 / round : 반올림
</code></pre><p><strong>&gt;    Mini Project: Cat Years</strong></p>
<ol>
<li><p>Begin by creating a variable named myAge, and set it equal to your age as a number. Write a comment that explains this line of code.</p>
</li>
<li><p>Next, create a variable named earlyYears and save the value 2 to it. Note, the value saved to this variable will change. Write a comment that explains this line of code.</p>
</li>
<li><p>Use the multiplication assignment operator *= to multiply the value saved to earlyYears by 25 and reassign it to earlyYears. This will account for the first two years of a cats life where they experience accelerated growth. Write a comment that explains this line of code.</p>
</li>
<li><p>Since we already accounted for the first two years, take the myAge variable, and subtract 2 from it. Set the result equal to a variable called laterYears. We&#39;ll be changing this value later. Write a comment that explains this line of code.</p>
</li>
<li><p>Multiply the laterYears variable by 4 to calculate the number of cat years accounted for by your later years. Use the multiplication assignment operator *= to multiply and assign in one step. Write a comment that explains this line of code.</p>
</li>
<li><p>If you&#39;d like to check your work at this point, log to the console  earlyYears and laterYears. Are the values what you expected?</p>
</li>
<li><p>Go ahead and delete the console logs from step 6. Add earlyYears and laterYears together, and store that in a variable named myAgeInCatYears.</p>
</li>
</ol>
<p>Write a comment that explains this line of code.</p>
<ol start="8">
<li><p>Save the value of your name to the variable myName. Write your name as a string and store the result in a variable called myName. Write a comment that explains this line of code.</p>
</li>
<li><p>Write a console.log statement that displays your name and age in cat years. Use string concatenation to display the value in the following sentence:</p>
</li>
</ol>
<p>My name is NAME. I am HUMAN AGE years old in human years which is CAT AGE years old in cat years.
Replace  &quot;NAME&quot; with myName, &quot;HUMANE AGE&quot; with myAge, and  &quot;CAT AGE&quot; with myAgeInCatYears in the sentence above.</p>
<pre><code>         // assign my age to the variable `myAge`
        var myAge = 20;

         // assign early years to the variable `earlyYears`
        var earlyYears = 2; 

        //multiply `earlyYears` by `25` to account for early growth rate
        earlyYears *= 25;

       // substract `2` years from `myAge` and assign to 
       //`laterYears`to account for growth rate of a cat after the first two years
        var laterYears = myAge - 2;

        // multiplying laterYears value by `4` to total cat years
        laterYears *= 4;

        //add value of earlyYears + laterYears fot the total age and assignt to `myAgeInCatYears`

        var myAgeInCatYears = earlyYears + laterYears ;

        // assign name to the variable `myName`
        var myName = &#39;Yoon&#39;;

        console.log(&quot; My name is &quot; + myName + &quot;. I am &quot; + myAge + &quot;years old in human years which is &quot; + myAgeInCatYears + &quot; years old in cat years.&quot;);


</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Operators Cheat Sheet / JavaScript]]></title>
            <link>https://velog.io/@yoon_aspyn/Operators-Cheat-Sheet-JavaScript</link>
            <guid>https://velog.io/@yoon_aspyn/Operators-Cheat-Sheet-JavaScript</guid>
            <pubDate>Wed, 18 Aug 2021 07:14:30 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p><strong>Definition:</strong>
“Operators are used to assign values, compare values, perform arithmetic operations and more. Operators allow programmers to create a single value from one or more values.”</p>
</blockquote>
<p><strong>Binary Operators(이항 연산자):</strong> 
Definition: Requires two operands, one before the operator and one after the operator.</p>
<p>Syntax: operand1 operator operand2</p>
<pre><code>2 + 3; or x * z;</code></pre><p><strong>Unary Operators(단항 연산자):</strong> 
Definition: Requires a single operand, either before or after the operator.</p>
<p>Syntax: operator operand OR operand operator</p>
<pre><code>y++ OR ++y</code></pre><blockquote>
<p><em><strong>Arithmetic Operators : Multiplication, Division, Modulus, Addition and Subtraction</strong></em>
*<em>Definition: *</em>
Takes numerical values (either literals or variables) as their operands and returns a single numerical value.</p>
</blockquote>
<p><strong>Comparison Operators(비교 연산자):</strong>
방정식의 양쪽을 비교하고 비교가 참인지 여부에 따라 논리 값을 반환합니다. 피연산자는 숫자 값, 문자열 값, 논리적 값 또는 객체 값일 수 있습니다.</p>
<p><em><strong>==</strong></em> : 연산자를 이용하여 서로 다른 유형의 두 변수의 [값] 비교</p>
<p><em><strong>===</strong></em> : 는 엄격한 비교를 하는 것으로 알려져 있다 ([값 &amp; 자료형] -&gt; true). <em>되도록이면 이 연산자를 사용할 것.</em></p>
<pre><code>5 == &#39;5&#39;; // true
5 === &#39;5&#39; // false</code></pre><p>** 부등 비교 연산자
**!= : 동등 연산자( == ) 의 논리적인 반대값이 됩니다. 동등 연산자로 비교시 true일 경우, 부등 연산자는 그 반대인 false를 반환 합니다. 즉, 동등 연산자의 반대값이 됩니다.</p>
<p>!== : 엄격한 등등 비교 연산자(===)의 논리적인 반대가 됩니다. 즉, 엄격하게 동등 연산자로 비교한 값의 반대값을 반환합니다.</p>
<p><em>JavaScript Beginner Bootcamp(2021)</em></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Strings Cheat Sheet / JavaScript]]></title>
            <link>https://velog.io/@yoon_aspyn/Strings-Cheat-Sheet</link>
            <guid>https://velog.io/@yoon_aspyn/Strings-Cheat-Sheet</guid>
            <pubDate>Wed, 18 Aug 2021 04:48:22 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p>String : 문텍스트를 나타나는데에 사용되는 데이터 유형. 더블 or 싱글 쿼테이션으로 표현</p>
</blockquote>
<pre><code>*Choose one implementation, either single or double quote, and use consistently. 
*Teams will often have agreed upon style guide.(프로젝트 팀에 맞게) 
</code></pre><pre><code>    **//QUOTES**
    var greeting = &quot;It&#39;s great to see you!&quot;;
    var response = &#39;Billy said, &quot;I am sick&quot;&#39;;

    **//ESCAPE CHARACTER**
    var greeting = &#39;It\&#39;s great to see you!&#39;;
    var response = &quot;Billy said, \&quot;I am sick&quot;;

    **//LENGTH PROPERTY**
    var greeting = &quot;It&#39;s great to see you!&quot;;
    greeting.length; //22

    **//STRING METHODS**
    **//toUpperCase()**
    var greeting = &#39;Good to see you!&#39;;
    greeting;//&#39;Good to see you!&#39;;

    var shoutGreeting =  greeting.toUpperCase();
    shoutGreeting; // &#39;GOOD TO SEE YOU&#39;;

    **//Joining Strings**
    var greeting = &quot;Hi,&quot;;
    var myName = &quot;Rob&quot;;
    greeting + &quot; &quot; + myName; // &quot;Hi, Rob&quot;</code></pre><p><em>JavaScript Beginner Bootcamp(2021)</em></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Variables Cheat Sheet / JavaScript]]></title>
            <link>https://velog.io/@yoon_aspyn/Variables-Cheat-Sheet-JavaScript</link>
            <guid>https://velog.io/@yoon_aspyn/Variables-Cheat-Sheet-JavaScript</guid>
            <pubDate>Wed, 18 Aug 2021 01:38:49 GMT</pubDate>
            <description><![CDATA[<blockquote>
<h3 id="variable-definition">Variable Definition:</h3>
<p>변수는 데이터 값을 저장하는 BOX
한가지를 담을 수 있는 BOX로 다른것을 넣으면 첫번째 것이 사라짐.</p>
</blockquote>
<pre><code>var myVariable; 
is different than 
var mYVariable; </code></pre><pre><code>변수의 이름은 숫자로 시작할 수 없음</code></pre><pre><code>Contain a space between words : var my_dog; </code></pre><h3 id="사람이-읽을-수-있어야함">&gt; <strong>사람이 읽을 수 있어야함.</strong></h3>
<p>우리는 우리 자신이나 컴퓨터만을 위해 코딩하는 것이 아니라 타인의 눈과 이해를 위해 코딩한다. 변수의 용도와 용도를 설명하는 이름을 지정하여, 다른 프로그래머들이 나중에 코드를 읽고 업데이트해야 할 수도 있다. 프로그램이 성장하고 점점 더 많은 변수, 객체 및 기능이 포함됨에 따라 좋은 변수 이름은 프로그램의 흐름을 따라가고 용도를 이해하는 데 도움이 될 수 있다. 따라서 변수 이름을 단순하고 직접적이며 기술적으로 유지해야한다.</p>
<pre><code>Acceptable practice: var x = 25;
Though concise, this is not descriptive.

Better practice: var age = 25;
&gt; Not as concise, but makes code clearer.
</code></pre><p><em>JavaScript Beginner Bootcamp (2021)</em></p>
]]></description>
        </item>
    </channel>
</rss>