Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Tuesday, November 29, 2022

SAT problem

SAT problem

SAT problem

Click on blue-cells until yello-cell equals to 1. Then you win!

Settings:

Discriptions:

  • Author: Tran Thu Le
  • Version: 0.0.1
  • Code: Github
  • Idea: This simple game is based on SAT problem
  • Note: Create new game by reloading page. Back to initial setup by clicking on Restart Game

PyScript

Link: PyScript (repl-tag)

Saturday, February 20, 2021

JavaScript For Loop

Page Template

In this post, we will learn how a For Loop work in JavaScript.

The code is

  	
    	<script>
          function myFunc(){
            var text = "";
            var i;
            for (i = 0; i < 10; i++) {
              text += i + "<br>";
            }
            document.getElementById("demo").innerHTML = text;
          }
        </script>
      
  

The result is as follows:

The result will appear here

Saturday, February 13, 2021

Javascript

jvs

Updated: 13 Feb 2021

Javascript

Today, we will learn very basic Javascript. Put the following content inside the tag script

          
          document.write("Hello the world from Javascript code in Blogger")
          document.write("To break the line, use string tag br")
          document.write("To open the console, press Ctrl+Shift+J")

          let name="Tran Thu Le"
          document.write("My name is ", name)

          let thule={
            name: "Tran Thu Le",
            handsome: true,
            age: 25,
          };
          document.write("My name? ", thule.name)
          document.write("Am I handsome? ", thule.handsome)
          document.write("My age? ", thule.age)
          
          

Then we will get

Popular Posts